mirror of
https://github.com/aljazceru/notedeck.git
synced 2025-12-17 08:44:20 +01:00
committed by
William Casarin
parent
2e9a00ee57
commit
19bc37b0bc
@@ -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
|
||||||
|
|||||||
@@ -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 {
|
||||||
|
|||||||
Reference in New Issue
Block a user