diff options
Diffstat (limited to 'core')
| -rw-r--r-- | core/colors.zig | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/core/colors.zig b/core/colors.zig index 960123e2..98b3b184 100644 --- a/core/colors.zig +++ b/core/colors.zig @@ -1476,16 +1476,20 @@ pub const ChromeTheme = struct { /// A theme in the new names as the old names say it: the fields they /// require and the new ones derive, from its chrome. `box_dim`, a resting /// grip's fill: the tag's own ground where the theme rings its grips itself -/// (acme's clean button, R6), else the resting ring. +/// (acme's clean button, R6), else the resting ring. The focused name the +/// chrome's, unless it lands on the theme's own focused ink, which the old +/// surfaces draw unheld (ferra's #fecdb2): then the plain tag's. fn viewOf(theme: *const Theme, r: *const Chrome) LegacyTheme { const fill = if (theme.grip_ring != null) r.tag[0].ground else r.grip.ring; + const own_focus_ink = theme.tag_focus_text orelse theme.tag_text; + const focused_name = if (std.mem.eql(u8, &r.name[1], &own_focus_ink)) r.name[0] else r.name[1]; return theme.toLegacy(.{ .sel_fg = r.page.selection.text, .lineno = r.line_number, .scroll_track = r.rail, .scroll_thumb = r.rail_thumb, .box_dim = fill, - .tag_active_name_fg = r.name[1], + .tag_active_name_fg = focused_name, .column_box_dim = r.grip.column_rest, }); } |
