domus

One damus client to rule them all
git clone git://jb55.com/domus
Log | Files | Refs | README

commit 2aa482344b5c22eee278196578b0bbd8d83c345d
parent 0c43677c54bd367728ab35d91440f7858a6aef7e
Author: William Casarin <jb55@jb55.com>
Date:   Fri, 16 Dec 2022 00:16:20 -0800

customize colors a bit

Diffstat:
Msrc/app.rs | 12++++++++++++
1 file changed, 12 insertions(+), 0 deletions(-)

diff --git a/src/app.rs b/src/app.rs @@ -396,9 +396,19 @@ fn render_panel(ctx: &egui::Context, app: &mut Damus) { }); } +fn set_app_style(ui: &mut egui::Ui) { + if ui.visuals().dark_mode { + ui.visuals_mut().override_text_color = Some(egui::Color32::WHITE); + ui.visuals_mut().panel_fill = egui::Color32::from_rgb(30, 30, 30); + } else { + ui.visuals_mut().override_text_color = Some(egui::Color32::BLACK); + }; +} + fn render_damus_mobile(ctx: &egui::Context, app: &mut Damus) { let panel_width = ctx.input().screen_rect.width(); egui::CentralPanel::default().show(ctx, |ui| { + set_app_style(ui); timeline_panel(ui, app, panel_width, 0); }); } @@ -419,6 +429,7 @@ fn render_damus_desktop(ctx: &egui::Context, app: &mut Damus) { if app.n_panels == 1 { let panel_width = ctx.input().screen_rect.width(); egui::CentralPanel::default().show(ctx, |ui| { + set_app_style(ui); timeline_panel(ui, app, panel_width, 0); }); @@ -426,6 +437,7 @@ fn render_damus_desktop(ctx: &egui::Context, app: &mut Damus) { } egui::CentralPanel::default().show(ctx, |ui| { + set_app_style(ui); egui::ScrollArea::horizontal() .auto_shrink([false; 2]) .show(ui, |ui| {