fix: expand editable QComboBoxes to show full model names in settings

When using long model names (e.g. OpenRouter models like
'openai/whisper-large-v3-turbo'), the combo boxes in Settings were
too narrow to display them, showing truncated text like 'open...ribe'.

Apply QSizePolicy.Expanding (horizontal) to all editable QComboBoxes
so they stretch to fill the available width of the form layout, just
as non-editable selects already do.

Affected boxes: transcribe_model, cleanup_model, cleanup_claude_model,
cleanup_codex_model, assistant_model, assistant_codex_model,
assistant_openrouter_model, meeting_model, paste_shortcut, repo,
and all shortcut picker boxes.
This commit is contained in:
Yasin Özmen
2026-08-23 18:37:32 +03:00
parent 3663c7fd57
commit f67220721b
+12 -1
View File
@@ -10,7 +10,7 @@ from PyQt6.QtWidgets import (
QAbstractItemView, QAbstractSpinBox, QCheckBox, QComboBox, QDialog,
QDialogButtonBox, QFileDialog, QFormLayout, QGroupBox, QHBoxLayout, QLabel,
QLineEdit, QListWidget, QListWidgetItem, QMenu, QMessageBox, QPlainTextEdit,
QPushButton, QScrollArea, QSpinBox, QTabWidget, QVBoxLayout, QWidget,
QPushButton, QScrollArea, QSpinBox, QTabWidget, QVBoxLayout, QWidget, QSizePolicy,
)
from . import __version__
@@ -224,6 +224,7 @@ class LocalModelBox(QGroupBox):
if self._repos is not None:
self.repo = QComboBox()
self.repo.setEditable(True)
self.repo.setSizePolicy(QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Fixed)
self.repo.setToolTip(t("A Hugging Face repository of GGUF files. The "
"list is fetched; any other one can be typed in."))
self.repo.currentTextChanged.connect(self._repo_changed)
@@ -663,6 +664,7 @@ class SettingsWindow(QDialog):
# them: a stored one this desktop does not offer is kept as it is
# rather than quietly replaced by the first item on the list.
self.paste_shortcut.setEditable(True)
self.paste_shortcut.setSizePolicy(QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Fixed)
self.paste_shortcut.addItems(paste.desktop().shortcuts)
self.paste_shortcut.setToolTip(t(
"macOS asks for Accessibility permission the first time this is sent."
@@ -761,6 +763,7 @@ class SettingsWindow(QDialog):
self.stt_form = stt_form
self.transcribe_model = QComboBox()
self.transcribe_model.setEditable(True)
self.transcribe_model.setSizePolicy(QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Fixed)
self.refresh_transcribe_models = QPushButton(t("Fetch model list"))
self.refresh_transcribe_models.clicked.connect(self._load_transcribe_models)
self.transcribe_model_row = self._row(self.transcribe_model,
@@ -829,6 +832,7 @@ class SettingsWindow(QDialog):
self.cleanup_model = QComboBox()
self.cleanup_model.setEditable(True)
self.cleanup_model.setSizePolicy(QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Fixed)
self.cleanup_model.addItems(CLEANUP_MODELS)
self.refresh_models = QPushButton(t("Fetch model list"))
self.refresh_models.clicked.connect(self._load_models)
@@ -840,11 +844,13 @@ class SettingsWindow(QDialog):
# field, and only the row of whoever is chosen is on screen.
self.cleanup_claude_model = QComboBox()
self.cleanup_claude_model.setEditable(True)
self.cleanup_claude_model.setSizePolicy(QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Fixed)
self.cleanup_claude_model.addItems(CLEANUP_CLAUDE_MODELS)
orr_form.addRow(t("Model"), self.cleanup_claude_model)
self.cleanup_codex_model = QComboBox()
self.cleanup_codex_model.setEditable(True)
self.cleanup_codex_model.setSizePolicy(QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Fixed)
self.cleanup_codex_model.addItems([t("Codex's own default")] + CODEX_MODELS)
orr_form.addRow(t("Model"), self.cleanup_codex_model)
@@ -1000,6 +1006,7 @@ class SettingsWindow(QDialog):
claude_form = QFormLayout(self.claude_box)
self.assistant_model = QComboBox()
self.assistant_model.setEditable(True)
self.assistant_model.setSizePolicy(QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Fixed)
self.assistant_model.addItems(ASSISTANT_MODELS)
self.assistant_model.setToolTip(t(
"A name like “sonnet” always means the newest model of that line. "
@@ -1017,6 +1024,7 @@ class SettingsWindow(QDialog):
codex_form = QFormLayout(self.codex_box)
self.assistant_codex_model = QComboBox()
self.assistant_codex_model.setEditable(True)
self.assistant_codex_model.setSizePolicy(QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Fixed)
self.assistant_codex_model.addItem(t("Codex's own default"), "")
for name in CODEX_MODELS:
self.assistant_codex_model.addItem(name, name)
@@ -1031,6 +1039,7 @@ class SettingsWindow(QDialog):
or_form = QFormLayout(self.openrouter_box)
self.assistant_openrouter_model = QComboBox()
self.assistant_openrouter_model.setEditable(True)
self.assistant_openrouter_model.setSizePolicy(QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Fixed)
self.assistant_openrouter_model.addItems(ASSISTANT_OR_MODELS)
or_form.addRow(t("Model"), self.assistant_openrouter_model)
or_note = QLabel(t(
@@ -1178,6 +1187,7 @@ class SettingsWindow(QDialog):
models_form = QFormLayout(models)
self.meeting_model = QComboBox()
self.meeting_model.setEditable(True)
self.meeting_model.setSizePolicy(QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Fixed)
self.meeting_model.addItems(MEETING_MODELS)
models_form.addRow(t("Model"), self.meeting_model)
self.meeting_reasoning = QComboBox()
@@ -1508,6 +1518,7 @@ class SettingsWindow(QDialog):
"""The field a global shortcut is typed or picked in."""
box = QComboBox()
box.setEditable(True)
box.setSizePolicy(QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Fixed)
box.addItems(MAC_SHORTCUTS if hotkey.backend() == hotkey.MACOS
else SHORTCUTS)
box.setCurrentText("")