Preserve live dimming settings and stabilize theme transition borders

This commit is contained in:
Samuel Onoja committed 2026-10-01 13:49:36 +01:00
1 parent dec4d54bd4
commit 9e966f81a0
9 files changed
+102 -30

No files matched your search

+19
View File
@@ -1069,6 +1069,25 @@ mod tests {
assert_eq!(configured_font(None), cosmic::font::default());
}
#[test]
fn bar_decoration_does_not_follow_transitional_text_contrast() {
let theme = config::ShellTheme::default();
let contrasted = config::ShellTheme {
text_primary: [0, 0, 0, 255],
text_muted: [255, 255, 255, 255],
..theme
};
let before = bar_group_style(theme);
let after = bar_group_style(contrasted);
assert_eq!(before.border, after.border);
assert_eq!(before.background, after.background);
assert_eq!(before.border.color, color(theme.border));
assert_eq!(
workspace_selector_style(false, false, true, theme).background,
workspace_selector_style(false, false, true, contrasted).background,
);
}
#[test]
fn workspace_selector_has_distinct_active_paint() {
let theme = ShellTheme::default();