Centralize accent foreground contrast across Ferese UI

This commit is contained in:
Samuel Onoja committed 2026-09-28 08:58:51 +01:00
1 parent 299f60e671
commit 24e15f76cb
14 files changed
+327 -64

No files matched your search

+9 -9
View File
@@ -115,15 +115,15 @@ impl Appearance {
corners.radius_m = [self.radius; 4];
corners.radius_l = [self.radius; 4];
corners.radius_xl = [self.radius; 4];
cosmic::Theme::custom(std::sync::Arc::new(
builder
.corner_radii(corners)
.bg_color(color(self.panel))
.primary_container_bg(color(self.panel))
.text_tint(color(self.text).color)
.accent(color(self.accent).color)
.build(),
))
let mut native = builder
.corner_radii(corners)
.bg_color(color(self.panel))
.primary_container_bg(color(self.panel))
.text_tint(color(self.text).color)
.accent(ferese_theme::accent_color(self.accent, self.panel))
.build();
ferese_theme::apply(&mut native, self.text);
cosmic::Theme::custom(std::sync::Arc::new(native))
}
}
+5 -2
View File
@@ -362,9 +362,12 @@ impl Locker {
.center_x(avatar_size)
.center_y(avatar_size)
.class(theme::Container::custom(move |_| {
let fill = ferese_theme::composite(a.accent.scale_alpha(0.18), a.panel);
let on = ferese_theme::foreground(fill, a.accent);
widget::container::Style {
background: Some(iced::Background::Color(a.accent.scale_alpha(0.18))),
text_color: Some(a.accent),
background: Some(iced::Background::Color(fill)),
text_color: Some(on),
icon_color: Some(on),
border: iced::Border {
radius: (avatar_size / 2.).into(),
width: 1.,