From 86632e1918af7b4338fe4300cc12010ddf4ea870 Mon Sep 17 00:00:00 2001 From: mARTin-B78 Date: Tue, 9 Jun 2026 23:06:32 +0200 Subject: [PATCH] fix: hide Internal Engine section for remote/streaming engines (v2.03.08) Removes whitespace gap between STT config card and device/precision card by hiding the latter when a Server or Realtime engine type is selected. Co-Authored-By: Claude Sonnet 4.6 --- linux/CHANGELOG.md | 8 ++++++++ linux/blitztext/__init__.py | 2 +- linux/blitztext/gtksettings.py | 12 ++++++++---- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/linux/CHANGELOG.md b/linux/CHANGELOG.md index 987c9b0..a419646 100644 --- a/linux/CHANGELOG.md +++ b/linux/CHANGELOG.md @@ -9,6 +9,14 @@ The version is defined in [`blitztext/__init__.py`](blitztext/__init__.py). ## [Unreleased] +## [2.03.08] - 2026-06-09 + +### Fixed +- **Engines tab layout.** The "Internal engine — device & precision" section is + now hidden when a remote (Server) or streaming engine type is selected — + removing the confusing whitespace gap and irrelevant device controls for + non-local engines. + ## [2.03.01] - 2026-06-09 ### Added diff --git a/linux/blitztext/__init__.py b/linux/blitztext/__init__.py index b425cbc..8158b10 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.07" +__version__ = "2.03.08" diff --git a/linux/blitztext/gtksettings.py b/linux/blitztext/gtksettings.py index 5f4f342..88882de 100644 --- a/linux/blitztext/gtksettings.py +++ b/linux/blitztext/gtksettings.py @@ -1201,12 +1201,12 @@ notebook.bt-nb tab:checked label { self.stt_key.connect("changed", lambda _e: self._schedule_models("stt")) self.stt_type.connect("changed", self._stt_type_changed) - # ── Device & precision card ─────────────────────────────────────────── - dev_card = _card_section(box, "Internal engine — device & precision") - self.stt_device = _labeled(dev_card, "Device", _type_combo(_DEVICE_OPTIONS, self.cfg.device), + # ── Device & precision card (local engines only) ───────────────────── + self.stt_dev_card = _card_section(box, "Internal engine — device & precision", margin_top=4) + self.stt_device = _labeled(self.stt_dev_card, "Device", _type_combo(_DEVICE_OPTIONS, self.cfg.device), tooltip="Which processor runs the speech model. " "Auto tries your GPU first. GPU (CUDA) requires NVIDIA — much faster than CPU.") - self.stt_compute = _labeled(dev_card, "Compute type", _type_combo(_COMPUTE_OPTIONS, self.cfg.compute_type), + self.stt_compute = _labeled(self.stt_dev_card, "Compute type", _type_combo(_COMPUTE_OPTIONS, self.cfg.compute_type), tooltip="Precision of the model. int8 is fastest and uses least memory. " "float16 is most accurate. Auto lets Blitztext decide.") @@ -1298,6 +1298,8 @@ notebook.bt-nb tab:checked label { else: _fill_combo(self.stt_model, [], e.model) self._stt_idx = idx + if hasattr(self, "stt_dev_card"): + self.stt_dev_card.set_visible(e.type == "local") self._stt_update_bench_info(e.name) def _stt_update_bench_info(self, engine_name: str) -> None: @@ -1501,6 +1503,8 @@ notebook.bt-nb tab:checked label { self._schedule_models("stt") else: _fill_combo(self.stt_model, [], _combo_text(self.stt_model)) + if hasattr(self, "stt_dev_card"): + self.stt_dev_card.set_visible(typ == "local") # -- model dropdowns (fetched from {url}/models) --- def _populate_models(self, combo, url: str, key_env: str) -> None: