fix(2.03.34): stop settings window growing wide/tall between pages
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 <noreply@anthropic.com>
This commit is contained in:
parent
5cd31c8385
commit
1f3bbf2668
@ -9,6 +9,18 @@ The version is defined in [`blitztext/__init__.py`](blitztext/__init__.py).
|
|||||||
|
|
||||||
## [Unreleased]
|
## [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
|
## [2.03.33] - 2026-06-10
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|||||||
@ -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.
|
(not in a container) so it can type into any application via xdotool.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__version__ = "2.03.33"
|
__version__ = "2.03.34"
|
||||||
|
|||||||
@ -840,7 +840,7 @@ class SettingsDialog:
|
|||||||
# Right stack
|
# Right stack
|
||||||
self._stack = Gtk.Stack()
|
self._stack = Gtk.Stack()
|
||||||
self._stack.set_transition_type(Gtk.StackTransitionType.NONE)
|
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)
|
_body.pack_start(self._stack, True, True, 0)
|
||||||
|
|
||||||
# Resize-grip strip — sits below the body, above the button row, so
|
# 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)
|
self.bench_summary.set_margin_top(4); self.bench_summary.set_margin_bottom(2)
|
||||||
results_box.pack_start(self.bench_summary, False, False, 0)
|
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 = Gtk.Paned(orientation=Gtk.Orientation.VERTICAL)
|
||||||
paned.pack1(sel_sw, resize=True, shrink=False)
|
paned.pack1(sel_sw, resize=True, shrink=False)
|
||||||
paned.pack2(results_box, 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(ww_sw, True, True, 0)
|
||||||
results_box.pack_start(self.wwb_summary, False, False, 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
|
# Wrap controls in a ScrolledWindow so the pane can shrink past its
|
||||||
# natural height when the user drags the divider upward.
|
# natural height when the user drags the divider upward.
|
||||||
ctrl_sw = Gtk.ScrolledWindow()
|
ctrl_sw = Gtk.ScrolledWindow()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user