Theme · Platform: one platform for buttons and caps, icon themes, frosted panes

theme::Platform moves out of typography and shell's ControlsStyle folds
into it; the theme's platform starts as the system's. Window buttons Ely
draws, the title bar's layout and every key cap follow it, secondary
included, through typography::keys::keystroke; a title bar whose buttons
the OS draws follows the OS. primitives::IconTheme lays an owner's rules
by file name and extension over Ely's map, for every file icon.
shell::Vibrancy fills a pane with the palette's new glass, translucent
so a window opened Blurred shows its backdrop, solid under high contrast.
gpui 0.2.2 has no Mica; that line stays blocked.
This commit is contained in:
ZacharyZhang-NY committed 2026-09-27 17:41:15 -04:00
1 parent 7f2205c811
commit d3cfc71ead
30 files changed
+593 -162

No files matched your search

+16 -1
View File
@@ -26,7 +26,7 @@ fn every_color_answers_to_its_name() {
for (ix, name) in Palette::NAMES.iter().enumerate() {
*palette.token_mut(name) = hsla(ix as f32 / 64.0, 0.5, 0.5, 1.0);
}
assert_eq!(Palette::NAMES.len(), 35, "every color of the palette");
assert_eq!(Palette::NAMES.len(), 36, "every color of the palette");
let at = |name: &str| {
Palette::NAMES
.iter()
@@ -50,3 +50,18 @@ fn every_color_answers_to_its_name() {
fn an_unknown_color_fails() {
Palette::light(false).token_mut("glow");
}
#[test]
fn glass_lets_the_blur_through_until_high_contrast() {
for (plain, strong) in [
(Palette::light(false), Palette::light(true)),
(Palette::dark(false), Palette::dark(true)),
] {
assert!(
plain.glass.a > 0.0 && plain.glass.a < 1.0,
"{:?}",
plain.glass
);
assert_eq!(strong.glass, strong.bg);
}
}