diff --git a/main/src/infrastructure/ui/util.rs b/main/src/infrastructure/ui/util.rs index 665a2d351..19455ce75 100644 --- a/main/src/infrastructure/ui/util.rs +++ b/main/src/infrastructure/ui/util.rs @@ -147,10 +147,17 @@ pub mod view { /// Use with care! Should be freed after use. fn create_mapping_row_background_brush() -> Option { - if Window::dark_mode_is_enabled() { + #[cfg(any(target_os = "macos", target_os = "windows"))] + { + if Window::dark_mode_is_enabled() { + None + } else { + Some(create_brush(SHADED_WHITE)) + } + } + #[cfg(target_os = "linux")] + { None - } else { - Some(create_brush(SHADED_WHITE)) } } diff --git a/swell-ui/src/window.rs b/swell-ui/src/window.rs index e257e4548..6ef4a2dd9 100644 --- a/swell-ui/src/window.rs +++ b/swell-ui/src/window.rs @@ -27,6 +27,7 @@ impl Window { Point::new(Pixels(point.x as _), Pixels(point.y as _)) } + #[cfg(any(target_os = "macos", target_os = "windows"))] pub fn dark_mode_is_enabled() -> bool { #[cfg(target_os = "macos")] { @@ -48,10 +49,6 @@ impl Window { let luma = rgb.into_luma(); luma.luma < 0.5 } - #[cfg(target_os = "linux")] - { - false - } } pub fn from_non_null(hwnd: NonNull) -> Window {