From 089c657baca22701aa2535ebf5a0a93576fdf6a2 Mon Sep 17 00:00:00 2001 From: Piotr Siuszko Date: Thu, 16 Feb 2023 00:27:26 +0100 Subject: [PATCH] Draw central panel last, fix theme switch button --- rusty_hub_egui/CHANGELOG.md => CHANGELOG.md | 1 + rusty_hub_egui/src/hub_client.rs | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) rename rusty_hub_egui/CHANGELOG.md => CHANGELOG.md (71%) diff --git a/rusty_hub_egui/CHANGELOG.md b/CHANGELOG.md similarity index 71% rename from rusty_hub_egui/CHANGELOG.md rename to CHANGELOG.md index c98190c..c1c0cb6 100644 --- a/rusty_hub_egui/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ # [0.2.0] - Update egui to 0.21 version - Initial macOS support +- Light theme # [0.1.0] diff --git a/rusty_hub_egui/src/hub_client.rs b/rusty_hub_egui/src/hub_client.rs index 660c442..f0a85cc 100644 --- a/rusty_hub_egui/src/hub_client.rs +++ b/rusty_hub_egui/src/hub_client.rs @@ -300,7 +300,7 @@ impl HubClient { } fn draw_editors_header(&mut self, _ctx: &egui::Context, ui: &mut Ui) { - let text_height = egui::TextStyle::Body.resolve(ui.style()).size * 2.0; + let text_height = egui::TextStyle::Body.resolve(ui.style()).size * 2.4; let table = build_header_table(ui); table.body(|body| { body.rows(text_height, 1, |_, mut row| { @@ -332,7 +332,7 @@ impl HubClient { } fn draw_project_header(&mut self, _ctx: &egui::Context, ui: &mut Ui) { - let text_height = egui::TextStyle::Body.resolve(ui.style()).size * 2.0; + let text_height = egui::TextStyle::Body.resolve(ui.style()).size * 2.4; let table = build_header_table(ui); table.body(|body| { body.rows(text_height, 1, |_, mut row| { @@ -451,7 +451,6 @@ impl eframe::App for HubClient { .show(ctx, |ui| { self.draw_side_panel(ui); }); - self.draw_central_panel(&ctx); egui::TopBottomPanel::bottom("bottomPanel").show(ctx, |ui| { ui.with_layout(Layout::right_to_left(eframe::emath::Align::Center), |ui| { egui::widgets::global_dark_light_mode_switch(ui); @@ -461,5 +460,6 @@ impl eframe::App for HubClient { ); }); }); + self.draw_central_panel(&ctx); } }