fix(theme): write button labels and panel headings in the preset's ink

button_foreground and secondary_foreground both resolve from
gpui-component's stock foreground, and apply_theme never overrode them —
so a button's label and the detail panel's section headings were the only
text in the window not written in the theme's own colour. On Rose Pine
Dawn that is near-black next to the preset's #575279 everywhere else.
This commit is contained in:
l0ng-ai
2026-08-08 10:42:25 +07:00
parent cbb9dc4016
commit 85bf4d91ab
+5
View File
@@ -305,6 +305,11 @@ pub(crate) fn apply_theme(mut window: Option<&mut Window>, cx: &mut App) {
t.foreground = rgb(m.foreground).into();
t.border = rgb(m.border).into();
t.secondary = rgb(m.secondary).into();
// Ink, not fill. gpui-component resolves both of these from its *stock*
// foreground, so a button's label and the detail panel's section headings
// were the only text in the window not written in the preset's own colour.
t.button_foreground = rgb(m.foreground).into();
t.secondary_foreground = rgb(m.foreground).into();
t.muted = rgb(m.muted).into();
t.muted_foreground = rgb(m.muted_foreground).into();
t.popover = rgb(m.popover).into();