mirror of
https://github.com/emilk/egui.git
synced 2026-08-31 05:40:03 -04:00
Merge branch 'master' of https://github.com/emilk/egui into multiples_viewports
This commit is contained in:
@@ -62,10 +62,18 @@ impl eframe::App for MyApp {
|
||||
} else {
|
||||
"???".to_owned()
|
||||
};
|
||||
if let Some(bytes) = &file.bytes {
|
||||
use std::fmt::Write as _;
|
||||
write!(info, " ({} bytes)", bytes.len()).ok();
|
||||
|
||||
let mut additional_info = vec![];
|
||||
if !file.mime.is_empty() {
|
||||
additional_info.push(format!("type: {}", file.mime));
|
||||
}
|
||||
if let Some(bytes) = &file.bytes {
|
||||
additional_info.push(format!("{} bytes", bytes.len()));
|
||||
}
|
||||
if !additional_info.is_empty() {
|
||||
info += &format!(" ({})", additional_info.join(", "));
|
||||
}
|
||||
|
||||
ui.label(info);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -11,6 +11,7 @@ publish = false
|
||||
eframe = { path = "../../crates/eframe", features = [
|
||||
"__screenshot", # __screenshot is so we can dump a screenshot using EFRAME_SCREENSHOT_TO
|
||||
] }
|
||||
egui_plot = { path = "../../crates/egui_plot" }
|
||||
image = { version = "0.24", default-features = false, features = ["png"] }
|
||||
rfd = "0.11.0"
|
||||
env_logger = "0.10"
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] // hide console window on Windows in release
|
||||
|
||||
use eframe::egui::plot::{Legend, Line, Plot, PlotPoints};
|
||||
use eframe::egui::ColorImage;
|
||||
use eframe::egui::{self, ViewportRender};
|
||||
use egui_plot::{Legend, Line, Plot, PlotPoints};
|
||||
|
||||
fn main() -> Result<(), eframe::Error> {
|
||||
env_logger::init(); // Log to stderr (if you run with `RUST_LOG=debug`).
|
||||
|
||||
Reference in New Issue
Block a user