fix web build

This commit is contained in:
2026-07-27 08:09:55 +07:00
parent b518c729f6
commit 9addbd49f4
5 changed files with 95 additions and 52 deletions

View File

@@ -3,6 +3,7 @@ pub enum PlatformKind {
Mac,
Linux,
Windows,
Web,
}
impl PlatformKind {
@@ -11,22 +12,21 @@ impl PlatformKind {
Self::Linux
} else if cfg!(target_os = "windows") {
Self::Windows
} else {
} else if cfg!(target_os = "macos") {
Self::Mac
} else {
Self::Web
}
}
#[allow(dead_code)]
pub fn is_linux(&self) -> bool {
matches!(self, Self::Linux)
}
#[allow(dead_code)]
pub fn is_windows(&self) -> bool {
matches!(self, Self::Windows)
}
#[allow(dead_code)]
pub fn is_mac(&self) -> bool {
matches!(self, Self::Mac)
}

View File

@@ -12,7 +12,6 @@ use theme::ActiveTheme;
use crate::{Icon, IconName, InteractiveElementExt as _, Sizable as _, StyledExt, h_flex};
pub const TITLE_BAR_HEIGHT: Pixels = px(34.);
#[cfg(target_os = "macos")]
pub const TRAFFIC_LIGHT_PADDING: f32 = 80.;
/// TitleBar used to customize the appearance of the title bar.