Add island bar layout and Settings controls
Group workspaces with Overview and status controls with the clock. Keep themed backgrounds and borders around each island, with click-through gaps and configurable side padding defaulting to 4 px. Capture blur within each panel region and update material and input regions when island bounds change. Cover layout reloads and padding changes with widget and native shell tests.
This commit is contained in:
1 parent
90e5c3543d
commit
004a5cdefe
12 files changed
+816
-45
No files matched your search
@@ -13,6 +13,29 @@ use serde_json::{Map, Value};
|
||||
|
||||
pub const DEFAULT_MATERIAL_OPACITY: f64 = 0.78;
|
||||
|
||||
#[derive(Clone, Copy, Debug, Default, serde::Deserialize, serde::Serialize, PartialEq, Eq)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
pub enum BarLayout {
|
||||
#[default]
|
||||
Continuous,
|
||||
Islands,
|
||||
}
|
||||
|
||||
pub const fn default_bar_island_padding() -> f32 {
|
||||
4.0
|
||||
}
|
||||
|
||||
pub fn deserialize_bar_island_padding<'de, D: serde::Deserializer<'de>>(deserializer: D) -> Result<f32, D::Error> {
|
||||
let padding = <f32 as serde::Deserialize>::deserialize(deserializer)?;
|
||||
if !padding.is_finite() || !(0.0..=32.0).contains(&padding) {
|
||||
return Err(serde::de::Error::custom(
|
||||
"bar-island-padding must be between 0 and 32 logical pixels",
|
||||
));
|
||||
}
|
||||
|
||||
Ok(padding)
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct Error(String);
|
||||
|
||||
|
||||
Reference in new issue
Block a user