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.zig14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/pdf_view.zig b/src/pdf_view.zig
index 8e9c1517..bb960139 100644
--- a/src/pdf_view.zig
+++ b/src/pdf_view.zig
@@ -2329,7 +2329,7 @@ pub fn applyNormal(core: *pardes.Pardes, pane: *pardes.Pane, a: modal.Normal.Act
if (comptime !enabled) return;
const state = pane.pdf orelse return;
const gpa = core.pdf_gpa;
- const native = core.native_images;
+ const native = core.frontend.native_images;
const cells: CellPixels = .{ .w = core.cell_pixels.w, .h = core.cell_pixels.h };
const viewport = paneViewport(core, pane);
const placed = if (native) paneGeometry(core, pane) else null;
@@ -2983,7 +2983,7 @@ pub fn pageAtGridRow(core: *const pardes.Pardes, pane: *const pardes.Pane, row:
/// Some page of the pane is placed where it is drawn.
pub fn paneNativeReady(core: *const pardes.Pardes, pane: *const pardes.Pane) bool {
if (comptime !enabled) return false;
- if (!core.native_images) return false;
+ if (!core.frontend.native_images) return false;
const state = if (pane.pdf) |view| view else return false;
const view = paneViewport(core, pane) orelse return false;
for (state.rasters[0..state.rasters_len]) |*raster| {
@@ -2999,7 +2999,7 @@ pub fn nativePageAtGridRow(
row: u16,
) ?usize {
if (comptime !enabled) return null;
- if (!core.native_images) return null;
+ if (!core.frontend.native_images) return null;
const state = if (pane.pdf) |view| view else return null;
const page = pageAtGridRow(core, pane, row) orelse return null;
const view = paneViewport(core, pane) orelse return null;
@@ -3246,7 +3246,7 @@ pub fn highlightInput(
.hover_page = hover_page,
.hover_color = if (link_hover) core.theme().box else selection_color,
.selection_color = selection_color,
- .live = core.native_image_patches,
+ .live = core.frontend.native_image_patches,
};
}
@@ -3279,7 +3279,7 @@ fn stripAt(state: *State, view: Viewport) f64 {
pub fn verticalWheel(core: *pardes.Pardes, pane: *pardes.Pane, direction: i8) void {
if (comptime !enabled) return;
- if (!core.native_images) {
+ if (!core.frontend.native_images) {
// The text layer: a page a notch.
const state = pane.pdf orelse return;
if (stepPage(state, core.pdf_gpa, direction)) resetPageChrome(pane);
@@ -3293,7 +3293,7 @@ pub fn verticalWheel(core: *pardes.Pardes, pane: *pardes.Pane, direction: i8) vo
pub fn horizontalWheel(core: *pardes.Pardes, pane: *pardes.Pane, direction: i8) void {
if (comptime !enabled) return;
const state = pane.pdf orelse return;
- if (!core.native_images or state.fit != .height) return;
+ if (!core.frontend.native_images or state.fit != .height) return;
const placed = paneGeometry(core, pane) orelse return;
const cols: u32 = @intCast(@max(1, config.wheel_cols));
_ = panPixels(state, placed, .horizontal, direction, scaledStep(core.cell_pixels.w, cols));
@@ -3310,7 +3310,7 @@ pub fn draw(
rail: *pardes.Region,
) bool {
if (comptime !enabled) return false;
- if (!core.native_images or rect.h <= pane.tag_rows) return false;
+ if (!core.frontend.native_images or rect.h <= pane.tag_rows) return false;
const state = pane.pdf orelse return false;
const view = paneViewport(core, pane) orelse return false;
const key = TintKey{ .mode = state.tint, .colors = tintColors(core) };