diff options
Diffstat (limited to 'src/gui')
| -rw-r--r-- | src/gui/gui.zig | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/src/gui/gui.zig b/src/gui/gui.zig index 989f6b25..92ded62c 100644 --- a/src/gui/gui.zig +++ b/src/gui/gui.zig @@ -295,8 +295,9 @@ test "a persistent scene presents a new panel's frame zero before advancing it" for (second.panelTracks()) |track| try std.testing.expectEqual(@as(u16, 1), track.frame); } -// Per pane: background, rule, two grip strokes, and two square rails. -const pane_chrome_vertices: usize = 6 * 6; +// Per pane: background, rule, two grip strokes, two square rails, and the +// rule under each of its notice chips. +const pane_chrome_vertices: usize = 6 * (6 + pardes.Pane.Notices.max); const max_overlay_vertices: usize = 24 + pet.max_vertices + pardes.MAX_COLS * 6 + pardes.MAX_PANES * pane_chrome_vertices + touch_click_flash_vertices + max_touch_points * (1100 + max_touch_trail_points * overlay_circle_vertices); const font_px_step: f32 = 2.0; @@ -7297,6 +7298,21 @@ fn appendPaneChrome( appendSquareRail(builder, x0, thumb_y0, thumb_y1, layout.w, true, overlayRgb(chrome.scroll_thumb)); } } + // A notice chip is tagline hung over the body's top rows, so it is ruled + // off from the text beneath it the way a tagline is: the same colour and + // thickness along its bottom, running to the window edge when it does. + for (surface.tagLayers()) |*layer| { + if (layer.cols == 0 or layer.kind != .notice) continue; + const x0 = @as(f32, @floatFromInt(layer.viewport.x)) * layout.w; + const x1 = x0 + @as(f32, @floatFromInt(layer.viewport.w)) * layout.w; + const rule_x1 = if (builder.win_w - x1 < layout.w) @max(x1, builder.win_w) else x1; + const top = @as(f32, @floatFromInt(layer.viewport.y)) * layout.h; + // A band still falling into place is cut at its row's top; its rule + // comes with it, and shows only once it is below that cut. + const rule_y = top + (1 + layer.slide) * layout.h; + if (rule_y - 1 < top) continue; + builder.addRect(x0, rule_y - 1, rule_x1, rule_y, overlayRgb(chrome.border)); + } appendColumnSpines(core, surface.rows, layout, builder); } |
