layout: make strips the titlebar with window controls

This commit is contained in:
2026-11-02 19:04:13 +07:00
parent f295b25366
commit a6014b4ff3
13 changed files with 603 additions and 62 deletions
+17
View File
@@ -31,6 +31,9 @@ pub enum IconRole {
EyeOff,
PanelLeft,
PanelRight,
WindowMinimize,
WindowMaximize,
WindowRestore,
}
impl IconRole {
@@ -52,6 +55,9 @@ impl IconRole {
Self::EyeOff,
Self::PanelLeft,
Self::PanelRight,
Self::WindowMinimize,
Self::WindowMaximize,
Self::WindowRestore,
]
}
@@ -73,6 +79,9 @@ impl IconRole {
Self::EyeOff => "icons/eye-off.svg",
Self::PanelLeft => "icons/panel-left.svg",
Self::PanelRight => "icons/panel-right.svg",
Self::WindowMinimize => "icons/minus.svg",
Self::WindowMaximize => "icons/square.svg",
Self::WindowRestore => "icons/copy.svg",
}
}
@@ -94,6 +103,9 @@ impl IconRole {
Self::EyeOff => "eye-off",
Self::PanelLeft => "panel-left",
Self::PanelRight => "panel-right",
Self::WindowMinimize => "window-minimize",
Self::WindowMaximize => "window-maximize",
Self::WindowRestore => "window-restore",
}
}
@@ -165,6 +177,9 @@ impl IconRole {
"panel-right",
"sidebar-right",
],
Self::WindowMinimize => &["window-minimize-symbolic", "window-minimize"],
Self::WindowMaximize => &["window-maximize-symbolic", "window-maximize"],
Self::WindowRestore => &["window-restore-symbolic", "window-restore"],
}
}
}
@@ -263,6 +278,8 @@ fn asset_bytes(path: &str) -> Option<&'static [u8]> {
match path {
"icons/check.svg" => Some(include_bytes!("../assets/check.svg")),
"icons/x.svg" => Some(include_bytes!("../assets/x.svg")),
"icons/square.svg" => Some(include_bytes!("../assets/square.svg")),
"icons/copy.svg" => Some(include_bytes!("../assets/copy.svg")),
"icons/chevron-down.svg" => Some(include_bytes!("../assets/chevron-down.svg")),
"icons/chevron-left.svg" => Some(include_bytes!("../assets/chevron-left.svg")),
"icons/chevron-right.svg" => Some(include_bytes!("../assets/chevron-right.svg")),