From 1f3bbf26688e0328cdb63197c4391a5cc37eae17 Mon Sep 17 00:00:00 2001 From: mARTin-B78 Date: Wed, 10 Jun 2026 14:40:42 +0200 Subject: [PATCH] fix(2.03.34): stop settings window growing wide/tall between pages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Stack.set_homogeneous(True) was requesting the max natural size of all children (incl. wide Benchmark TreeViews) and forcing the dialog to 1000+px wide for every page. Reverted to False so the window stays at 860×700 and pages scroll if taller than the viewport. Also removed the NEVER/NEVER ScrolledWindow policy on both benchmark pages — it was propagating natural TreeView width up to the Stack, amplifying the homogeneous bug. Co-Authored-By: Claude Sonnet 4.6 --- linux/CHANGELOG.md | 12 ++++++++++++ linux/blitztext/__init__.py | 2 +- linux/blitztext/gtksettings.py | 12 +----------- 3 files changed, 14 insertions(+), 12 deletions(-) diff --git a/linux/CHANGELOG.md b/linux/CHANGELOG.md index a98dca7..0cda091 100644 --- a/linux/CHANGELOG.md +++ b/linux/CHANGELOG.md @@ -9,6 +9,18 @@ The version is defined in [`blitztext/__init__.py`](blitztext/__init__.py). ## [Unreleased] +## [2.03.34] - 2026-06-10 + +### Fixed +- **Settings window no longer grows wide or tall when switching pages.** + `Stack.set_homogeneous(True)` was causing the Stack to request the maximum + natural size of all its children (both width and height), so pages like + Benchmark — STT (wide TreeView) inflated the dialog to 1000+ px wide for + every other page. Reverted to `False`; the dialog now stays at its default + 860 × 700 and each page scrolls if its content is taller than the window. + Also removed the erroneous `NEVER/NEVER` ScrolledWindow policy on the two + benchmark pages that was propagating natural TreeView width to the Stack. + ## [2.03.33] - 2026-06-10 ### Fixed diff --git a/linux/blitztext/__init__.py b/linux/blitztext/__init__.py index 346b158..625e9aa 100644 --- a/linux/blitztext/__init__.py +++ b/linux/blitztext/__init__.py @@ -6,4 +6,4 @@ counterpart to the macOS Blitztext menu bar app: it runs natively on the host (not in a container) so it can type into any application via xdotool. """ -__version__ = "2.03.33" +__version__ = "2.03.34" diff --git a/linux/blitztext/gtksettings.py b/linux/blitztext/gtksettings.py index 8e43f6a..f2b2acc 100644 --- a/linux/blitztext/gtksettings.py +++ b/linux/blitztext/gtksettings.py @@ -840,7 +840,7 @@ class SettingsDialog: # Right stack self._stack = Gtk.Stack() self._stack.set_transition_type(Gtk.StackTransitionType.NONE) - self._stack.set_homogeneous(True) # keep window size stable across pages + self._stack.set_homogeneous(False) _body.pack_start(self._stack, True, True, 0) # Resize-grip strip — sits below the body, above the button row, so @@ -2497,11 +2497,6 @@ class SettingsDialog: self.bench_summary.set_margin_top(4); self.bench_summary.set_margin_bottom(2) results_box.pack_start(self.bench_summary, False, False, 0) - # Disable the page-level SW so the paned fills the viewport height - _psw = page.get_parent() - if isinstance(_psw, Gtk.ScrolledWindow): - _psw.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.NEVER) - paned = Gtk.Paned(orientation=Gtk.Orientation.VERTICAL) paned.pack1(sel_sw, resize=True, shrink=False) paned.pack2(results_box, resize=True, shrink=False) @@ -2648,11 +2643,6 @@ class SettingsDialog: results_box.pack_start(ww_sw, True, True, 0) results_box.pack_start(self.wwb_summary, False, False, 0) - # Disable the page-level SW so the paned fills the viewport height - _psw = page.get_parent() - if isinstance(_psw, Gtk.ScrolledWindow): - _psw.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.NEVER) - # Wrap controls in a ScrolledWindow so the pane can shrink past its # natural height when the user drags the divider upward. ctrl_sw = Gtk.ScrolledWindow()