summaryrefslogtreecommitdiff
path: root/dev
diff options
context:
space:
mode:
Diffstat (limited to 'dev')
-rw-r--r--dev/gui/gui.zig17
1 files changed, 10 insertions, 7 deletions
diff --git a/dev/gui/gui.zig b/dev/gui/gui.zig
index 66074f42..a478db03 100644
--- a/dev/gui/gui.zig
+++ b/dev/gui/gui.zig
@@ -5035,7 +5035,7 @@ fn buildDecor(g: *Gui, gpa: std.mem.Allocator, surface: *const pardes.Surface, g
else => {},
} else false;
if (grid_bottom < win_h and tag_last) try addDecor(g, gpa, 0, grid_bottom, win_w, win_h, chrome.tag_bg, 1, win_w, win_h);
- try paneDecor(g, gpa, regions, &surface.tag_layers[pardes.BAND_LAYER], surface.rail_ticks[0..surface.nrail_ticks], surface.heat.items, chrome, layout, surface.cols, surface.rows, win_w, win_h);
+ try paneDecor(g, gpa, regions, &surface.tag_layers, surface.rail_ticks[0..surface.nrail_ticks], surface.heat.items, chrome, layout, surface.cols, surface.rows, win_w, win_h);
try laneDecor(g, gpa, surface, layout, win_w, win_h);
// A single spine runs down each column, through every tag and body.
for (regions) |column| {
@@ -5140,7 +5140,7 @@ fn laneStrip(g: *Gui, gpa: std.mem.Allocator, lane: pardes.Lane, row: i32, ride:
/// Each pane's rule between its tag and body, and its scroll rail: a page
/// coloured gutter with a thin track and its thumb, running down through the
/// pixels past the last whole row.
-fn paneDecor(g: *Gui, gpa: std.mem.Allocator, regions: []const pardes.Region, band: *const pardes.Layer, ticks: []const pardes.RailTick, heat: []const pardes.RailHeat, chrome: *const pardes.Chrome, layout: CellLayout, cols: u16, rows: u16, win_w: f32, win_h: f32) !void {
+fn paneDecor(g: *Gui, gpa: std.mem.Allocator, regions: []const pardes.Region, tags: []const pardes.Layer, ticks: []const pardes.RailTick, heat: []const pardes.RailHeat, chrome: *const pardes.Chrome, layout: CellLayout, cols: u16, rows: u16, win_w: f32, win_h: f32) !void {
const page = chrome.page orelse bg_default;
for (regions) |rail| {
if (rail.kind != .rail or rail.rect.h == 0) continue;
@@ -5156,11 +5156,14 @@ fn paneDecor(g: *Gui, gpa: std.mem.Allocator, regions: []const pardes.Region, ba
// top, over one below its body.
const rule_x1 = if (win_w - x1 < layout.w) @max(x1, win_w) else x1;
const tag_bottom = tag.rect.y > rail.rect.y;
- // A band drawn over the body (a terminal's, a kind's: Band.over)
- // is the tag grown downward too: the rule under its last row (UX
- // D5, E3).
- const over = band.rows > 0 and band.kind == .band and band.id == rail.owner and !tag_bottom;
- const tag_end = if (over) @max(tag.rect.y + tag.rect.h, band.viewport.y + band.rows) else tag.rect.y + tag.rect.h;
+ // A head and a band drawn over the body (Band.covered) are the tag
+ // grown downward too: the rule under their last row (UX D5, E3,
+ // DESIGN I1).
+ const band = &tags[pardes.BAND_LAYER];
+ const head = &tags[rail.owner];
+ var tag_end = tag.rect.y + tag.rect.h;
+ if (!tag_bottom and head.rows > 0) tag_end = @max(tag_end, head.viewport.y + head.rows);
+ if (!tag_bottom and band.rows > 0 and band.kind == .band and band.id == rail.owner) tag_end = @max(tag_end, band.viewport.y + band.rows);
const rule_y = @as(f32, @floatFromInt(if (tag_bottom) tag.rect.y else tag_end)) * layout.h;
try addDecor(g, gpa, x0, if (tag_bottom) rule_y else rule_y - dp(1), rule_x1, if (tag_bottom) rule_y + dp(1) else rule_y, chrome.tag_rule orelse mixRgb(chrome.tag_bg, page), 1, win_w, win_h);
// Stacked panes are ruled apart as columns are, where one pane's