//! The progress widgets in a window, with a scrubber: cargo run -p medlar --example visuals #[path = "../tests/visuals/gallery.rs"] mod gallery; use eframe::egui::{self, Ui}; use medlar_app::app::App; use medlar_app::desktop::Sources; use medlar_core::settings::Settings; struct Window(App); impl eframe::App for Window { fn ui(&mut self, ui: &mut Ui, _: &mut eframe::Frame) { let half = ui.max_rect().split_left_right_at_fraction(0.5); self.0.frame(ui, |app, ui| { ui.scope_builder(egui::UiBuilder::new().max_rect(half.0), |ui| gallery::gallery(app, ui)); ui.scope_builder(egui::UiBuilder::new().max_rect(half.1), |ui| gallery::states(app, ui)); }); } } fn main() -> eframe::Result { let options = eframe::NativeOptions { viewport: egui::ViewportBuilder::default().with_inner_size([1500.0, 760.0]), ..Default::default() }; let make = |cc: &eframe::CreationContext| App::new(&cc.egui_ctx, Settings::default(), Sources::detect()); eframe::run_native("medlar-visuals", options, Box::new(move |cc| Ok(Box::new(Window(make(cc)))))) }