From b2ecfab86e11721b9b48dd6d17cb0c94ef94ca25 Mon Sep 17 00:00:00 2001 From: Dion Moult Date: Thu, 9 Jul 2026 13:17:55 +1000 Subject: [PATCH] style: theme input/tab-bar, align header height with body rows - Theme QInputDialog (the New Group / Rename Group popup) so it follows the dark theme instead of rendering light. - Theme the generic QTabBar that QMainWindow creates for tabbed docks (previously bright white). The app's own #appTabBar keeps its look via more specific selectors. - Reduce QHeaderView::section vertical padding (7px -> 4px) so table/tree header rows match the body row height throughout the UI. Co-Authored-By: Claude Opus 4.8 --- src/bonsaiviewer/components/Style.cpp | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/src/bonsaiviewer/components/Style.cpp b/src/bonsaiviewer/components/Style.cpp index 069197428f..175c3d8a93 100644 --- a/src/bonsaiviewer/components/Style.cpp +++ b/src/bonsaiviewer/components/Style.cpp @@ -50,6 +50,29 @@ QString buildAppStyleSheet() { background: ${app_background}; color: ${primary_text}; } + QInputDialog, + QInputDialog QWidget { + background: ${app_background}; + color: ${primary_text}; + } + /* Generic tab bar — e.g. the QTabBar QMainWindow creates when docks are + tabbed together. appTabBar's #-selectors below are more specific and + still win for the app's own top tabs. */ + QTabBar { + background: ${app_background}; + } + QTabBar::tab { + background: ${tab_background}; + color: ${secondary_text}; + padding: 5px 12px; + } + QTabBar::tab:selected { + background: ${panel_background}; + color: ${primary_text}; + } + QTabBar::tab:hover { + color: ${hover_text}; + } QTabBar#appTabBar { background: ${tab_bar_background}; } @@ -180,7 +203,9 @@ QString buildAppStyleSheet() { color: ${primary_text}; border: none; border-bottom: 1px solid ${border}; - padding: 7px 8px; + /* Match the body row height: same vertical padding as + QTreeView/QListView/QTableView::item (4px) below. */ + padding: 4px 8px; font-weight: 600; } QTableCornerButton::section {