summaryrefslogtreecommitdiff
path: root/src/pdf_view.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/pdf_view.zig')
-rw-r--r--src/pdf_view.zig7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/pdf_view.zig b/src/pdf_view.zig
index b2fd5866..78d3de27 100644
--- a/src/pdf_view.zig
+++ b/src/pdf_view.zig
@@ -2542,6 +2542,7 @@ pub fn horizontalWheel(core: *pardes.Pardes, pane: *pardes.Pane, direction: i8)
pub fn draw(
core: *pardes.Pardes,
+ s: *pardes.Surface,
pane: *pardes.Pane,
rect: pardes.Rect,
pane_id: usize,
@@ -2622,8 +2623,8 @@ pub fn draw(
const theme = core.theme();
const pane_bg: pardes.Color = if (theme.bg) |color| .{ .rgb = color } else .default;
// The rail runs past the notice bands; only the thumb tracks the text.
- core.surface.fill(rect.x, body_y, 1, body_h, .{ .bg = .{ .rgb = chrome.scroll_track } });
- core.surface.fill(rect.x + 1, body_y, 1, body_h, .{ .bg = pane_bg });
+ s.fill(rect.x, body_y, 1, body_h, .{ .bg = .{ .rgb = chrome.scroll_track } });
+ s.fill(rect.x + 1, body_y, 1, body_h, .{ .bg = pane_bg });
const track_h: usize = body_h;
const total = @max(@as(u64, 1), state.document_height);
@@ -2641,7 +2642,7 @@ pub fn draw(
));
var y = pos;
while (y < track_h and y < pos + len) : (y += 1)
- core.surface.fill(
+ s.fill(
rect.x,
body_y + @as(u16, @intCast(y)),
1,