From 22edb7f56f2a667177723a32a57a13fa077ddd47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ulrich=20Sp=C3=B6rlein?= Date: Fri, 8 May 2026 15:14:07 +0200 Subject: Fix and off-by-one error for fit-to-page zoom In dual pane mode, with a mix of landscape and portrait pages, the wrong zoom level was getting applied to the wrong panes. For comic book spreads with the right side page being double-wide, this was ok. But when the left-page was double-wide, the extra zoom was applied to the *preceeding* dual pane view (making it extra small) and the actual wider pane got the standard zoom factor applied. Add debug logging showing the decision being made, which uncoveres the bug. --- libdocument/ev-debug.c | 2 ++ libdocument/ev-debug.h | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'libdocument') diff --git a/libdocument/ev-debug.c b/libdocument/ev-debug.c index 1d8adb7d..15aeb9ae 100644 --- a/libdocument/ev-debug.c +++ b/libdocument/ev-debug.c @@ -57,6 +57,8 @@ debug_init () if (g_getenv ("EV_DEBUG_JOBS") != NULL) ev_debug |= EV_DEBUG_JOBS; + if (g_getenv ("EV_DEBUG_ZOOM") != NULL) + ev_debug |= EV_DEBUG_ZOOM; } static void diff --git a/libdocument/ev-debug.h b/libdocument/ev-debug.h index e1faf424..abf6ba5a 100644 --- a/libdocument/ev-debug.h +++ b/libdocument/ev-debug.h @@ -72,10 +72,12 @@ G_BEGIN_DECLS */ typedef enum { EV_NO_DEBUG = 0, - EV_DEBUG_JOBS = 1 << 0 + EV_DEBUG_JOBS = 1 << 0, + EV_DEBUG_ZOOM = 1 << 1 } EvDebugSection; #define DEBUG_JOBS EV_DEBUG_JOBS, __FILE__, __LINE__, G_STRFUNC +#define DEBUG_ZOOM EV_DEBUG_ZOOM, __FILE__, __LINE__, G_STRFUNC /* * Set an environmental var of the same name to turn on -- cgit v1.2.1