From f2a85bb634cd5dd246dafbd0165399c44224a776 Mon Sep 17 00:00:00 2001 From: pax Date: Mon, 6 Apr 2026 19:17:40 -0500 Subject: [PATCH] Scale up landscape content if window too narrow (min 250px height) --- booru_viewer/gui/preview.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/booru_viewer/gui/preview.py b/booru_viewer/gui/preview.py index 2040160..9f23197 100644 --- a/booru_viewer/gui/preview.py +++ b/booru_viewer/gui/preview.py @@ -262,7 +262,13 @@ class FullscreenPreview(QMainWindow): max_h = int(avail.height() * 0.85) # 15% margin top+bottom else: max_w = max_h = 9999 - w = min(self.width(), max_w) + w = self.width() + # If current width makes landscape content too small, scale up + new_h = int(w / aspect) + if aspect >= 1 and new_h < 250: + w = int(max_h * 0.5 * aspect) + new_h = int(w / aspect) + w = min(w, max_w) new_h = int(w / aspect) if new_h > max_h: new_h = max_h