fix(2.03.33): stable window size between pages, fix benchmark-ww controls clipped

- Stack.set_homogeneous(True) keeps dialog height constant when switching pages
- Benchmark WW paned position raised 260→390 so all TTS config, engine
  checkboxes, wakeword/samples/run fields are visible without scrolling
- Both benchmark pages disable their page-level ScrolledWindow so the
  Paned fills the viewport rather than growing to natural height

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
mARTin-B78 2026-06-10 12:56:39 +02:00
parent af34360caa
commit 5cd31c8385
3 changed files with 30 additions and 2 deletions

View File

@ -9,6 +9,21 @@ The version is defined in [`blitztext/__init__.py`](blitztext/__init__.py).
## [Unreleased]
## [2.03.33] - 2026-06-10
### Fixed
- **Settings window no longer resizes when switching pages.** Added
`Gtk.Stack.set_homogeneous(True)` so the dialog always allocates the
maximum page height, preventing the window from growing or shrinking
as pages are visited.
- **Benchmark — Wakeword: "Engines to test" section no longer hidden.**
The paned divider position was raised from 260 to 390 px so all TTS
config fields, the engine checkboxes, wakeword model selector, sample
count, and run button are fully visible without scrolling. Both
benchmark pages also disable the page-level `ScrolledWindow` so the
paned correctly fills the viewport height rather than expanding
past it.
## [2.03.32] - 2026-06-10
### Changed

View File

@ -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.32"
__version__ = "2.03.33"

View File

@ -840,6 +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
_body.pack_start(self._stack, True, True, 0)
# Resize-grip strip — sits below the body, above the button row, so
@ -2496,6 +2497,11 @@ 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)
@ -2642,6 +2648,11 @@ 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()
@ -2650,10 +2661,12 @@ class SettingsDialog:
ctrl_sw.add(ctrl)
# ---- Paned: drag the divider to give more space to the table ----
# Controls need ~390px (URL + key + model + voices + Connect +
# engines section + checkboxes + wakeword + samples + run button).
ww_paned = Gtk.Paned(orientation=Gtk.Orientation.VERTICAL)
ww_paned.pack1(ctrl_sw, resize=True, shrink=True)
ww_paned.pack2(results_box, resize=True, shrink=False)
ww_paned.set_position(260)
ww_paned.set_position(390)
page.pack_start(ww_paned, True, True, 4)
def _run_bench(self, _b) -> None: