summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/draw.zig6
-rw-r--r--core/surface.zig5
2 files changed, 9 insertions, 2 deletions
diff --git a/core/draw.zig b/core/draw.zig
index dbbb6148..68778667 100644
--- a/core/draw.zig
+++ b/core/draw.zig
@@ -102,8 +102,9 @@ pub fn place(p: *Pardes, s: *Surface) void {
const active = id == v.active;
const tag_y = p.tagTop(pane, r);
const body_y = p.bodyTop(pane, r);
- s.addRegion(.{ .kind = .grip, .owner = owner, .serial = pane.serial, .active = active, .dirty = tagline.dirty(pane), .rect = .{ .x = r.x, .y = tag_y, .w = config.GUTTER, .h = pane.tag_rows } });
- s.addRegion(.{ .kind = .tag, .owner = owner, .serial = pane.serial, .active = active, .rect = .{ .x = r.x + config.GUTTER, .y = tag_y, .w = r.w - config.GUTTER, .h = pane.tag_rows } });
+ const reading = pardes.Trail.reading(p, pane);
+ s.addRegion(.{ .kind = .grip, .owner = owner, .serial = pane.serial, .active = active, .dirty = tagline.dirty(pane), .reading = reading, .rect = .{ .x = r.x, .y = tag_y, .w = config.GUTTER, .h = pane.tag_rows } });
+ s.addRegion(.{ .kind = .tag, .owner = owner, .serial = pane.serial, .active = active, .reading = reading, .rect = .{ .x = r.x + config.GUTTER, .y = tag_y, .w = r.w - config.GUTTER, .h = pane.tag_rows } });
// A folded pane is its tag rows and nothing else.
if (pane.collapsed) continue;
const body_h = r.h -| pane.tag_rows;
@@ -332,6 +333,7 @@ pub fn render(p: *Pardes, arena: std.mem.Allocator) !*Surface {
.tag_bg = chrome.tag_bg,
.tagline_bg = chrome.tagline_bg,
.tag_focus_bg = chrome.tag_active_bg,
+ .tag_reading_bg = chrome.tag_reading_bg,
.tag_fg = chrome.tag_fg,
.scroll_track = chrome.scroll_track,
.scroll_thumb = chrome.scroll_thumb,
diff --git a/core/surface.zig b/core/surface.zig
index 7c04a387..b78b58de 100644
--- a/core/surface.zig
+++ b/core/surface.zig
@@ -119,6 +119,9 @@ pub const Region = struct {
active: bool = false,
/// A grip's pane has changes it has not saved.
dirty: bool = false,
+ /// A grip's or a tag's pane reads (Trail.reading): its tag's ground is
+ /// the reading tint (`Chrome.tag_reading_bg`), focused or not.
+ reading: bool = false,
/// A rail's thumb: rows from the rail's top, and how many. Zero rows is
/// a rail with no thumb (an image). A kind's thumb is where its paint
/// said its window is (`pa_paint.at`, `span`: a PDF's strip), filled in
@@ -188,6 +191,8 @@ pub const Chrome = struct {
tagline_rows: u16 = 0,
/// The focused pane's and column's tag underlay.
tag_focus_bg: [3]u8 = .{ 0, 0, 0 },
+ /// A reading pane's tag underlay (Region.reading).
+ tag_reading_bg: [3]u8 = .{ 0, 0, 0 },
tag_fg: [3]u8 = .{ 0, 0, 0 },
scroll_track: [3]u8 = .{ 0, 0, 0 },
scroll_thumb: [3]u8 = .{ 0, 0, 0 },