From 0c6eed3e3812fe1f34c9c6edf41fcef34afda783 Mon Sep 17 00:00:00 2001 From: Nicolas Date: Tue, 1 Oct 2024 17:10:57 +0200 Subject: [PATCH] update to egui `0.29.1` --- Cargo.toml | 10 +++++----- src/main.rs | 1 - src/ui/settings.rs | 9 +++++++-- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 1362efd..76451b7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -33,16 +33,16 @@ short_description = "A GUI for the awtrix clock." # Error handling anyhow = "1.0.89" # Networking -reqwest = { version = "0.12.7", features = ["blocking"] } +reqwest = { version = "0.12.8", features = ["blocking"] } # Parsing serde = { version = "1.0.210", features = ["derive"] } serde_json = "1.0.128" semver = "1.0.23" # GUI -eframe = "0.28.1" -egui = "0.28.1" -egui-notify = "0.15.0" -egui_extras = { version = "0.28.1", features = ["syntect", "image"] } +eframe = "0.29.1" +egui = "0.29.1" +egui-notify = { git = "https://github.com/ItsEthra/egui-notify", branch = "master" } +egui_extras = { version = "0.29.1", features = ["syntect", "image"] } image = "0.25.2" open = "5.3.0" parking_lot = "0.12.3" diff --git a/src/main.rs b/src/main.rs index 08b64fa..1e7dfac 100644 --- a/src/main.rs +++ b/src/main.rs @@ -18,7 +18,6 @@ fn main() -> anyhow::Result<()> { "Awtrix", eframe::NativeOptions { viewport, - follow_system_theme: true, centered: true, ..Default::default() }, diff --git a/src/ui/settings.rs b/src/ui/settings.rs index 5457958..8f80bdf 100644 --- a/src/ui/settings.rs +++ b/src/ui/settings.rs @@ -52,8 +52,13 @@ impl Settings { }); let theme = syntax_highlighting::CodeTheme::from_style(ui.style()); let mut layouter = |ui: &Ui, string: &str, wrap_width: f32| { - let mut layout_job = - syntax_highlighting::highlight(ui.ctx(), &theme, string, &self.language); + let mut layout_job = syntax_highlighting::highlight( + ui.ctx(), + ui.style(), + &theme, + string, + &self.language, + ); layout_job.wrap.max_width = wrap_width; ui.fonts(|f| f.layout_job(layout_job)) };