diff --git a/dikte/settings_ui.py b/dikte/settings_ui.py index d3a97b7..d42ac7e 100644 --- a/dikte/settings_ui.py +++ b/dikte/settings_ui.py @@ -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("")