Drop the tick from drop-lists; the row is already tinted

The selected row carries selection-background-color, so a checkmark repeats
what the colour says — and in a combo as wide as "VN" it repeated it on top of
the letters. A combo's default delegate paints menu-style, which is where the
glyph comes from; a plain QStyledItemDelegate paints item-view style, which has
none. widen_popup does both jobs now, so it is tidy_popup.

check_combo_popup additionally requires the delegate to be the plain one and the
stylesheet to still tint the current row — removing the delegate line fails it.

21/21 checkers pass.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Nam Pham Dinh Thanh
2026-08-18 15:03:39 +09:00
co-authored by Claude Opus 5
parent 509ae96854
commit 416d88d72f
3 changed files with 35 additions and 12 deletions
+5 -5
View File
@@ -20,7 +20,7 @@ from . import APP_NAME, DISPLAY_NAME, __version__
from .config import PROVIDER_LABELS, AppConfig
from .i18n import LANGUAGE_SHORT, LANGUAGES, get_language, on_language_changed, set_language, tr
from .state import AppContext
from .ui.widgets import widen_popup
from .ui.widgets import tidy_popup
from .theme import current_palette, set_active_theme, stylesheet
from .core.task_scheduler import TaskScheduler
from .ui.cowork_tab import CoworkTab
@@ -261,7 +261,7 @@ class MainWindow(QMainWindow):
self.nav_project.setObjectName("navProjectPick")
self.nav_project.setToolTip(tr("app.nav.project_pick"))
self.nav_project.currentIndexChanged.connect(self._on_rail_project_pick)
widen_popup(self.nav_project)
tidy_popup(self.nav_project)
self.nav_new_chat = QPushButton(tr("cowork.new_chat"))
self.nav_new_chat.setObjectName("navNewChatBtn")
self.nav_new_chat.setIcon(_icon("plus"))
@@ -675,7 +675,7 @@ class MainWindow(QMainWindow):
if idx >= 0:
self.nav_project.setCurrentIndex(idx)
has = bool(choices)
widen_popup(self.nav_project)
tidy_popup(self.nav_project)
self.nav_project.setEnabled(has)
self.nav_project_btn.setEnabled(has)
self.nav_project_btn.setToolTip(
@@ -991,7 +991,7 @@ class MainWindow(QMainWindow):
idx = self.language_combo.findData(get_language())
if idx >= 0:
self.language_combo.setCurrentIndex(idx)
widen_popup(self.language_combo)
tidy_popup(self.language_combo)
self.language_combo.currentIndexChanged.connect(self._on_language_changed)
who.addWidget(self.language_combo)
self.theme_btn = self._build_theme_button()
@@ -1005,7 +1005,7 @@ class MainWindow(QMainWindow):
self.provider_combo.setToolTip(tr("app.provider"))
for key, label in PROVIDER_LABELS.items():
self.provider_combo.addItem(label, key)
widen_popup(self.provider_combo)
tidy_popup(self.provider_combo)
idx = self.provider_combo.findData(self.ctx.config.active_provider)
if idx >= 0:
self.provider_combo.setCurrentIndex(idx)