panel: off-white

Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
kernelkind
2024-11-29 10:04:09 -08:00
committed by William Casarin
parent 2e9a00ee57
commit 19bc37b0bc
2 changed files with 8 additions and 4 deletions

View File

@@ -22,6 +22,7 @@ const LIGHT_GRAY: Color32 = Color32::from_rgb(0xc8, 0xc8, 0xc8); // 78%
pub const MID_GRAY: Color32 = Color32::from_rgb(0xbd, 0xbd, 0xbd); pub const MID_GRAY: Color32 = Color32::from_rgb(0xbd, 0xbd, 0xbd);
const DARKER_GRAY: Color32 = Color32::from_rgb(0xa5, 0xa5, 0xa5); // 65% const DARKER_GRAY: Color32 = Color32::from_rgb(0xa5, 0xa5, 0xa5); // 65%
const EVEN_DARKER_GRAY: Color32 = Color32::from_rgb(0x89, 0x89, 0x89); // 54% const EVEN_DARKER_GRAY: Color32 = Color32::from_rgb(0x89, 0x89, 0x89); // 54%
pub const ALMOST_WHITE: Color32 = Color32::from_rgb(0xFA, 0xFA, 0xFA);
pub struct ColorTheme { pub struct ColorTheme {
// VISUALS // VISUALS

View File

@@ -70,10 +70,13 @@ impl<'a> DesktopSidePanel<'a> {
} }
pub fn show(&mut self, ui: &mut egui::Ui) -> SidePanelResponse { pub fn show(&mut self, ui: &mut egui::Ui) -> SidePanelResponse {
egui::Frame::none() let mut frame = egui::Frame::none().inner_margin(Margin::same(8.0));
.inner_margin(Margin::same(8.0))
.show(ui, |ui| self.show_inner(ui)) if !ui.visuals().dark_mode {
.inner frame = frame.fill(colors::ALMOST_WHITE);
}
frame.show(ui, |ui| self.show_inner(ui)).inner
} }
fn show_inner(&mut self, ui: &mut egui::Ui) -> SidePanelResponse { fn show_inner(&mut self, ui: &mut egui::Ui) -> SidePanelResponse {