summaryrefslogtreecommitdiff
path: root/core/draw.zig
diff options
context:
space:
mode:
Diffstat (limited to 'core/draw.zig')
-rw-r--r--core/draw.zig21
1 files changed, 13 insertions, 8 deletions
diff --git a/core/draw.zig b/core/draw.zig
index 2553d5be..d2e54cbb 100644
--- a/core/draw.zig
+++ b/core/draw.zig
@@ -330,11 +330,14 @@ pub fn render(p: *Pardes, arena: std.mem.Allocator) !*Surface {
s.placements.clearRetainingCapacity();
@memset(&s.gpu_frames, null);
const chrome = p.chromeTheme();
+ // The window's rules and grips from the chrome (the themes programme's
+ // L2e; DESIGN.md R6, R11, G1').
+ const resolved = p.chrome();
s.chrome = .{
.page = p.theme().bg,
.fg = p.theme().fg,
- .border = chrome.border,
- .topbar_rule = config.gui_topbar_pane_border_rgb orelse chrome.border,
+ .border = resolved.rule,
+ .topbar_rule = config.gui_topbar_pane_border_rgb orelse resolved.rule,
.tag_bg = chrome.tag_bg,
.tagline_bg = chrome.tagline_bg,
.tag_focus_bg = chrome.tag_active_bg,
@@ -344,12 +347,14 @@ pub fn render(p: *Pardes, arena: std.mem.Allocator) !*Surface {
.scroll_thumb = chrome.scroll_thumb,
.match_tick = chrome.search_bg,
.match_current = p.theme().fg orelse chrome.tag_fg,
- .rule_px = p.theme().rule_px orelse 2,
- .grip_border = boxBorder(p),
- .grip_focus_ring = chrome.box,
- .grip_dirty = boxDirty(p),
- .tag_rule = p.theme().tag_rule,
- .rail_px = @intCast(@min(255, @as(u32, p.theme().rail_px orelse 12) * p.settings.grip_width / 100)),
+ .rule_px = resolved.rule_px,
+ .grip_border = resolved.grip.ring,
+ .grip_focus_ring = resolved.grip.focus,
+ .grip_dirty = resolved.grip.dirty,
+ .grip_mode = resolved.grip.mode,
+ .grip_ink = resolved.grip.ink,
+ .tag_rule = resolved.tag_rule,
+ .rail_px = @intCast(@min(255, @as(u32, resolved.rail_px) * p.settings.grip_width / 100)),
};
place(p, s);
// Separators have their own role; a scrollbar need not frame the page.