summaryrefslogtreecommitdiff
path: root/src/draw.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/draw.zig')
-rw-r--r--src/draw.zig10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/draw.zig b/src/draw.zig
index 136c57a8..e8276904 100644
--- a/src/draw.zig
+++ b/src/draw.zig
@@ -110,13 +110,13 @@ pub fn place(p: *Pardes, s: *Surface) void {
if (p.col_w[c] == 0) continue;
const active = if (layout.findPane(p, p.active)) |found| found.col == c else false;
const inset = @min(TAG_TEXT_INSET, p.col_w[c]);
- s.addRegion(.{ .kind = .column_grip, .owner = @intCast(c), .serial = p.col_serial[c], .active = active, .rect = .{ .x = p.col_x[c], .y = p.topBarHeight(), .w = @min(config.GUTTER, p.col_w[c]), .h = column_rows } });
- s.addRegion(.{ .kind = .column_tag, .owner = @intCast(c), .serial = p.col_serial[c], .active = active, .rect = .{ .x = p.col_x[c] + inset, .y = p.topBarHeight(), .w = p.col_w[c] - inset, .h = column_rows } });
+ s.addRegion(.{ .kind = .column_grip, .owner = @intCast(c), .serial = p.cols[c].serial, .active = active, .rect = .{ .x = p.col_x[c], .y = p.topBarHeight(), .w = @min(config.GUTTER, p.col_w[c]), .h = column_rows } });
+ s.addRegion(.{ .kind = .column_tag, .owner = @intCast(c), .serial = p.cols[c].serial, .active = active, .rect = .{ .x = p.col_x[c] + inset, .y = p.topBarHeight(), .w = p.col_w[c] - inset, .h = column_rows } });
};
const active_col = if (layout.findPane(p, p.active)) |found| found.col else null;
for (0..p.ncol) |c| {
if (p.col_w[c] == 0) continue;
- s.addRegion(.{ .kind = .column, .owner = @intCast(c), .serial = p.col_serial[c], .active = active_col == c, .rect = .{ .x = p.col_x[c], .y = p.topBarHeight(), .w = p.col_w[c], .h = s.rows -| p.topBarHeight() } });
+ s.addRegion(.{ .kind = .column, .owner = @intCast(c), .serial = p.cols[c].serial, .active = active_col == c, .rect = .{ .x = p.col_x[c], .y = p.topBarHeight(), .w = p.col_w[c], .h = s.rows -| p.topBarHeight() } });
}
if (p.settings.workspace_tag)
s.addRegion(.{ .kind = .workspace_tag, .rect = .{ .x = 0, .y = 0, .w = s.cols, .h = p.topBarHeight() } });
@@ -221,7 +221,7 @@ pub fn render(p: *Pardes, arena: std.mem.Allocator) !*Surface {
// Separators have their own role; a scrollbar need not frame the page.
const whole = s.regions[0].rect;
s.fill(whole.x, whole.y, whole.w, whole.h, .{ .bg = .{ .rgb = chrome.border } });
- for (0..p.ncol) |c| if (p.col_n[c] == 0) s.fill(p.col_x[c], p.topBarHeight() + layout.columnBarHeight(p), p.col_w[c], s.rows -| (p.topBarHeight() + layout.columnBarHeight(p)), .{ .bg = .{ .rgb = chrome.empty_col } });
+ for (0..p.ncol) |c| if (p.cols[c].n == 0) s.fill(p.col_x[c], p.topBarHeight() + layout.columnBarHeight(p), p.col_w[c], s.rows -| (p.topBarHeight() + layout.columnBarHeight(p)), .{ .bg = .{ .rgb = chrome.empty_col } });
for (&p.panes, 0..) |*slot, id| {
const pane = slot.* orelse continue;
@@ -587,7 +587,7 @@ fn renderHeaderLayer(p: *Pardes, layer: *pardes.Layer, kind: TagKind, id: u16, v
if (layer.cells.len != count) layer.cells = try p.gpa.realloc(layer.cells, count);
layer.kind = kind;
layer.id = id;
- layer.serial = if (kind == .column) p.col_serial[id] else 0;
+ layer.serial = if (kind == .column) p.cols[id].serial else 0;
layer.viewport = viewport;
layer.cols = columns;
layer.rows = viewport.h;