Add gamma control and night light (#38)
Add configurable night light, smooth gamma transitions, and shell controls. Update documentation and panel tests, and fix portal test startup synchronization.
This commit is contained in:
1 parent
9163374cdb
commit
2a400b26d0
34 files changed
+940
-20
No files matched your search
@@ -34,7 +34,7 @@ impl std::fmt::Display for StyleChoice {
|
||||
}
|
||||
}
|
||||
|
||||
const CATALOG: [CatalogItem; 13] = [
|
||||
const CATALOG: [CatalogItem; 14] = [
|
||||
CatalogItem(ItemKind::Overview),
|
||||
CatalogItem(ItemKind::Workspaces {
|
||||
style: ferese_panel::WorkspaceStyle::Dots,
|
||||
@@ -43,6 +43,7 @@ const CATALOG: [CatalogItem; 13] = [
|
||||
CatalogItem(ItemKind::Media),
|
||||
CatalogItem(ItemKind::Activities),
|
||||
CatalogItem(ItemKind::QuickSettings),
|
||||
CatalogItem(ItemKind::NightLight),
|
||||
CatalogItem(ItemKind::Network),
|
||||
CatalogItem(ItemKind::Audio),
|
||||
CatalogItem(ItemKind::Recording),
|
||||
@@ -862,6 +863,7 @@ pub(super) fn item_icon(kind: ItemKind, tint: cosmic::iced::Color) -> widget::ic
|
||||
ItemKind::Media => icons::MEDIA,
|
||||
ItemKind::Activities => icons::FERESE,
|
||||
ItemKind::QuickSettings => icons::CONTROL_CENTER,
|
||||
ItemKind::NightLight => icons::MOON,
|
||||
ItemKind::Network => icons::WIFI_FULL,
|
||||
ItemKind::Audio => icons::VOLUME_HIGH,
|
||||
ItemKind::Recording => icons::RECORD,
|
||||
|
||||
@@ -631,7 +631,9 @@ animations { speed 0.8; }
|
||||
apply(&mut snapshot, Action::SetEdge(ferese_panel::Edge::Bottom));
|
||||
let before = snapshot.item("panels.0.start").unwrap().clone();
|
||||
assert_eq!(snapshot.string("panels.0.edge", ""), "bottom");
|
||||
assert!(snapshot.boolean("panels.0.end.groups.0.items.6.percentage", false));
|
||||
let panels: Vec<Panel> = serde_json::from_value(snapshot.item("panels").unwrap().clone()).unwrap();
|
||||
let battery = panels[0].item(&ItemId("battery".into())).unwrap();
|
||||
assert_eq!(battery.kind, ItemKind::Battery { percentage: true });
|
||||
apply(&mut snapshot, Action::SetEdge(ferese_panel::Edge::Top));
|
||||
assert_eq!(snapshot.string("panels.0.edge", ""), "top");
|
||||
assert_eq!(snapshot.item("panels.0.start"), Some(&before));
|
||||
@@ -659,8 +661,10 @@ animations { speed 0.8; }
|
||||
for edit in edits {
|
||||
snapshot.edit(&edit).unwrap();
|
||||
}
|
||||
assert!(!snapshot.boolean("panels.0.end.groups.0.items.6.visible", true));
|
||||
assert!(snapshot.boolean("panels.0.end.groups.0.items.6.percentage", false));
|
||||
let panels: Vec<Panel> = serde_json::from_value(snapshot.item("panels").unwrap().clone()).unwrap();
|
||||
let battery = panels[0].item(&ItemId("battery".into())).unwrap();
|
||||
assert_eq!(battery.kind, ItemKind::Battery { percentage: true });
|
||||
assert!(!battery.visible);
|
||||
assert!(snapshot.source.contains("// preserved"));
|
||||
Snapshot::parse(snapshot.source).unwrap();
|
||||
}
|
||||
|
||||
@@ -368,6 +368,7 @@ impl App {
|
||||
ItemKind::Media => icons::MEDIA,
|
||||
ItemKind::Activities => icons::FERESE,
|
||||
ItemKind::QuickSettings => icons::CONTROL_CENTER,
|
||||
ItemKind::NightLight => icons::MOON,
|
||||
ItemKind::Network => icons::WIFI_FULL,
|
||||
ItemKind::Audio => icons::VOLUME_HIGH,
|
||||
ItemKind::Recording => icons::RECORD,
|
||||
|
||||
Reference in new issue
Block a user