Consolidate desktop controls with editable holidays and a running-window tray

This commit is contained in:
aria committed 2026-10-28 06:02:46 +09:00
1 parent 9908dde9f8
commit 326465952a
55 files changed
+4207 -450

No files matched your search

+30 -1
View File
@@ -118,6 +118,10 @@ impl App {
.map_err(|error| error.to_string())?
.into_iter()
.next()
.map(|mut panel| {
panel.consolidate_clock_controls();
panel
})
.ok_or_else(|| "No panel configured.".into())
}
@@ -383,6 +387,25 @@ impl App {
let control_height =
(self.draft.number("panels.0.geometry.height", 36.) as f32 - 4.).max(20.);
let palette = visuals::Palette::from_resolved(&self.resolved.presented);
if item.kind == ItemKind::Notifications {
let mark = container(cosmic::widget::Space::new().width(3).height(13))
.id(format!("preview-icon:{}", item.id.0))
.class(visuals::surface(cosmic::iced::Color::WHITE, 1.5));
let control = button::custom(container(mark).center_y(control_height))
.name(ferese_config::tr!("Edit Notifications"))
.padding([0, 4])
.height(control_height)
.on_press(Message::PanelSelect(item.id.clone()))
.class(preview_button(
palette,
self.panel_selection.as_ref() == Some(&item.id),
));
return container(control)
.id(format!("preview-item:{}", item.id.0))
.width(width.map_or(Length::Shrink, Length::Fixed))
.clip(true)
.into();
}
if let ItemKind::Workspaces { style } = item.kind {
let sample = ferese_theme::workspaces::sample(style, palette, self.font, 20.);
let control =
@@ -405,6 +428,7 @@ impl App {
ItemKind::Overview => icons::FERESE,
ItemKind::Workspaces { .. } => icons::OVERVIEW,
ItemKind::FocusedWindow => icons::DISPLAY,
ItemKind::WindowTray => icons::APPLICATION,
ItemKind::Media => icons::MEDIA,
ItemKind::Activities => icons::FERESE,
ItemKind::QuickSettings => icons::CONTROL_CENTER,
@@ -447,9 +471,14 @@ impl App {
.id(format!("preview-icon:{}", item.id.0)),
);
if item.kind == ItemKind::WindowTray {
for source in [icons::DISPLAY, icons::FERESE] {
content = content.push(icons::tinted(source, 16, palette.text));
}
}
if !label.is_empty() {
content = content.push(
self.label(label, 12.)
self.label(ferese_config::locale::text(label), 12.)
.wrapping(cosmic::iced::widget::text::Wrapping::None),
);
}