diff --git a/profiler_gui/images/default/arrow-down-hover.svg b/profiler_gui/images/default/arrow-down-hover.svg index 1fedf69..60981a3 100644 --- a/profiler_gui/images/default/arrow-down-hover.svg +++ b/profiler_gui/images/default/arrow-down-hover.svg @@ -5,7 +5,7 @@ width="451.847px" height="451.847px" viewBox="0 0 451.847 451.847" style="enable-background:new 0 0 451.847 451.847;" xml:space="preserve"> - diff --git a/profiler_gui/images/default/arrow-up-hover.svg b/profiler_gui/images/default/arrow-up-hover.svg index 9c4f637..a1a1d35 100644 --- a/profiler_gui/images/default/arrow-up-hover.svg +++ b/profiler_gui/images/default/arrow-up-hover.svg @@ -5,7 +5,7 @@ width="451.847px" height="451.846px" viewBox="0 0 451.847 451.846" style="enable-background:new 0 0 451.847 451.846;" xml:space="preserve"> - diff --git a/profiler_gui/images/default/check-disabled.svg b/profiler_gui/images/default/check-disabled.svg index 53eb1f9..deae8d2 100644 --- a/profiler_gui/images/default/check-disabled.svg +++ b/profiler_gui/images/default/check-disabled.svg @@ -3,6 +3,6 @@ - + diff --git a/profiler_gui/images/default/check-partial-disabled.svg b/profiler_gui/images/default/check-partial-disabled.svg index 57a0277..38d5ea5 100644 --- a/profiler_gui/images/default/check-partial-disabled.svg +++ b/profiler_gui/images/default/check-partial-disabled.svg @@ -2,6 +2,6 @@ - + diff --git a/profiler_gui/images/default/check-partial.svg b/profiler_gui/images/default/check-partial.svg index 45a6760..317a1a8 100644 --- a/profiler_gui/images/default/check-partial.svg +++ b/profiler_gui/images/default/check-partial.svg @@ -2,6 +2,6 @@ - + diff --git a/profiler_gui/images/default/check.svg b/profiler_gui/images/default/check.svg index cc1eb65..f971676 100644 --- a/profiler_gui/images/default/check.svg +++ b/profiler_gui/images/default/check.svg @@ -3,6 +3,6 @@ - + diff --git a/profiler_gui/images/default/radio-indicator-disabled.svg b/profiler_gui/images/default/radio-indicator-disabled.svg index cb9540e..aa1018f 100644 --- a/profiler_gui/images/default/radio-indicator-disabled.svg +++ b/profiler_gui/images/default/radio-indicator-disabled.svg @@ -2,6 +2,6 @@ - + diff --git a/profiler_gui/images/default/radio-indicator.svg b/profiler_gui/images/default/radio-indicator.svg index 76e0974..215470a 100644 --- a/profiler_gui/images/default/radio-indicator.svg +++ b/profiler_gui/images/default/radio-indicator.svg @@ -2,6 +2,6 @@ - + diff --git a/profiler_gui/main_window.cpp b/profiler_gui/main_window.cpp index 84289f4..a0dfc0c 100644 --- a/profiler_gui/main_window.cpp +++ b/profiler_gui/main_window.cpp @@ -160,39 +160,38 @@ inline void loadTheme(const QString& _theme) if (!style.isEmpty()) { // Find font family - const auto fontFamilyString = QRegularExpression("font-family:.*;").match(style).captured(); + const auto fontMatch = QRegularExpression("font-family:\\s*\\\"(.*)\\\"\\s*;").match(style); + const auto fontFamily = fontMatch.hasMatch() ? fontMatch.captured(fontMatch.lastCapturedIndex()) : QString("DejaVu Sans"); + //QMessageBox::information(nullptr, "Found font family", fontFamily); // Calculate point size using current font - auto dummy = new QWidget(); - dummy->setStyleSheet(QString("QWidget { %1\nfont-size: 100pt; }").arg(fontFamilyString)); - dummy->show(); // actual font become valid only after widget showEvent - const auto pointSizeF = QFontMetricsF(dummy->font()).height() * 1e-2; - delete dummy; - - //QMessageBox::information(nullptr, "asfdasf", QString("100pt = %1 = %2").arg(pointSizeF * 1e2).arg((int)(pointSizeF * 1e2 + 0.5))); + const auto pointSizeF = QFontMetricsF(QFont(fontFamily, 100)).height() * 1e-2; + //QMessageBox::information(nullptr, "Point size", QString("100pt = %1\n1pt = %2").arg(pointSizeF * 1e2).arg(pointSizeF)); // Find and convert all sizes from points to pixels QRegularExpression re("(\\d+\\.?\\d*)ex"); auto it = re.globalMatch(style); - QSet matchedTexts; - std::vector all; - while (it.hasNext()) + std::vector matches; { - const auto match = it.next(); - if (!matchedTexts.contains(match.captured())) + QSet uniqueMatches; + while (it.hasNext()) { - matchedTexts.insert(match.captured()); - all.emplace_back(match.capturedTexts()); + const auto match = it.next(); + if (!uniqueMatches.contains(match.captured())) + { + uniqueMatches.insert(match.captured()); + matches.emplace_back(match.capturedTexts()); + } } } - for (const auto& match : all) + for (const auto& capturedTexts : matches) { - const auto pt = match.back().toDouble(); + const auto pt = capturedTexts.back().toDouble(); const int pixels = static_cast(pointSizeF * pt + 0.5); - //QMessageBox::information(nullptr, "bbb", QString("Replacing %1\nwith\n%2\n\npt = %3").arg(match.front()).arg(QString("%1px").arg(pixels)).arg(pt)); - style.replace(match.front(), QString("%1px").arg(pixels)); + //QMessageBox::information(nullptr, "Style-sheet modification", QString("Replacing '%1'\nwith\n'%2px'\n\npt count: %3").arg(capturedTexts.front()).arg(pixels).arg(pt)); + style.replace(capturedTexts.front(), QString("%1px").arg(pixels)); } qApp->setStyleSheet(style); @@ -271,8 +270,10 @@ void MainWindow::configureSizes() const auto updateFont = [&] (QFont& font) { font.setFamily(fontFamily); - font.setPixelSize(pixelSize); - font.setPointSize(pointSize); + if (pixelSize >= 0) + font.setPixelSize(pixelSize); + if (pointSize >= 0) + font.setPointSize(pointSize); }; auto& fonts = EASY_GLOBALS.font; diff --git a/profiler_gui/themes/default.css b/profiler_gui/themes/default.css index 3de9ed8..6d7eabd 100644 --- a/profiler_gui/themes/default.css +++ b/profiler_gui/themes/default.css @@ -7,477 +7,389 @@ * * ***********************************/ * { - font-family: "DejaVu Sans"; - font-size: 10pt; - color: #504040; -} + font-family: "DejaVu Sans"; + font-size: 10pt; + color: #504040; } *:disabled { - color: #c4c4c4; -} + color: #c4c4c4; } RoundProgressIndicator { - qproperty-color: #3297FD; - qproperty-background: #c4c4c4; - background: transparent; -} + qproperty-color: #3297FD; + qproperty-background: #c4c4c4; + background: transparent; } MainWindow, QToolBar, QDialog { - background-color: #f8f2f2; -} + background-color: #f8f2f2; } QToolTip { - background-color: #ffeccc; - border: 1px solid #c4c4c4; - color: #504040; -} + background-color: #ffeccc; + border: 1px solid #c4c4c4; + color: #504040; } ArbitraryValueToolTip { - margin: 0; - border: none; - background-color: #ffeccc; -} - -ArbitraryValueToolTip QWidget#cnt { - border: 1px solid #c4c4c4; - background-color: transparent; - margin: 0; -} - -ArbitraryValueToolTip QLabel { - background-color: transparent; - border: none; - color: #504040; -} - -ArbitraryValueToolTip QTextEdit { - background-color: transparent; - border: none; - color: #504040; - selection-color: white; - selection-background-color: #3297FD; -} + margin: 0; + border: none; + background-color: #ffeccc; } + ArbitraryValueToolTip QWidget#cnt { + border: 1px solid #c4c4c4; + background-color: transparent; + margin: 0; } + ArbitraryValueToolTip QLabel { + background-color: transparent; + border: none; + color: #504040; } + ArbitraryValueToolTip QTextEdit { + background-color: transparent; + border: none; + color: #504040; + selection-color: white; + selection-background-color: #3297FD; } QWidget#DiagramPopup, QWidget#ThreadsPopup { - background-color: #ffeccc; - border: 1px solid #c4c4c4; -} + background-color: #ffeccc; + border: 1px solid #c4c4c4; } QGraphicsView { - border: 1px solid #c4c4c4; -} + border: 1px solid #c4c4c4; } QSplitter::handle:hover { - background-color: #3297FD; -} + background-color: #3297FD; } QSplitter::handle:pressed { - background-color: #0264c7; -} + background-color: #0264c7; } QLabel#BlocksTreeWidget_HintLabel { - color: gray; - font-size: 13pt; -} + color: gray; + font-size: 13pt; } /* ****************************************************************************************************************** */ QLineEdit, QSpinBox { - border: 1px solid #c4c4c4; - background-color: white; - selection-background-color: #3297FD; - selection-color: white; - height: 15ex; -} + border: 1px solid #c4c4c4; + background-color: white; + selection-background-color: #3297FD; + selection-color: white; + height: 15ex; } QComboBox { - border: 1px solid #c4c4c4; - background-color: white; - selection-background-color: #B4D5FE; - selection-color: #504040; - height: 15ex; - padding-right: 11ex; -} + border: 1px solid #c4c4c4; + background-color: white; + selection-background-color: #B4D5FE; + selection-color: #504040; + height: 15ex; + padding-right: 11ex; } QLineEdit:disabled, QComboBox:disabled, QSpinBox:disabled { - background-color: #f0f0f0; - color: #c4c4c4; - selection-background-color: #B4D5FE; - selection-color: #c4c4c4; -} + background-color: #f0f0f0; + color: #c4c4c4; + selection-background-color: #B4D5FE; + selection-color: #c4c4c4; } QLineEdit:focus { - border: 1px solid #3297FD; -} + border: 1px solid #3297FD; } /* ****************************************************************************************************************** */ QComboBox::drop-down { - subcontrol-origin: border; - subcontrol-position: center right; - border: none; - width: 10ex; -} + subcontrol-origin: border; + subcontrol-position: center right; + border: none; + width: 10ex; } QComboBox::down-arrow { - image: url(":/images/default/arrow-down"); - width: 5ex; - height: 5ex; -} + image: url(":/images/default/arrow-down"); + width: 5ex; + height: 5ex; } QComboBox::down-arrow:hover { - image: url(":/images/default/arrow-down-hover"); -} + image: url(":/images/default/arrow-down-hover"); } QComboBox::down-arrow:disabled { - image: url(":/images/default/arrow-down-disabled"); -} + image: url(":/images/default/arrow-down-disabled"); } /* ****************************************************************************************************************** */ QSpinBox::up-button { - subcontrol-origin: padding; - subcontrol-position: top right; - border: none; - width: 10ex; -} + subcontrol-origin: padding; + subcontrol-position: top right; + border: none; + width: 10ex; } QSpinBox::down-button { - subcontrol-origin: padding; - subcontrol-position: bottom right; - border: none; - width: 10ex; -} + subcontrol-origin: padding; + subcontrol-position: bottom right; + border: none; + width: 10ex; } QSpinBox::up-arrow { - image: url(":/images/default/arrow-up"); - width: 5ex; - height: 5ex; -} + image: url(":/images/default/arrow-up"); + width: 5ex; + height: 5ex; } QSpinBox::up-arrow:hover { - image: url(":/images/default/arrow-up-hover"); -} + image: url(":/images/default/arrow-up-hover"); } QSpinBox::up-arrow:pressed { - image: url(":/images/default/arrow-up-pressed"); -} + image: url(":/images/default/arrow-up-pressed"); } QSpinBox::up-arrow:disabled { - image: url(":/images/default/arrow-up-disabled"); -} + image: url(":/images/default/arrow-up-disabled"); } QSpinBox::down-arrow { - image: url(":/images/default/arrow-down"); - width: 5ex; - height: 5ex; -} + image: url(":/images/default/arrow-down"); + width: 5ex; + height: 5ex; } QSpinBox::down-arrow:hover { - image: url(":/images/default/arrow-down-hover"); -} + image: url(":/images/default/arrow-down-hover"); } QSpinBox::down-arrow:pressed { - image: url(":/images/default/arrow-down-pressed"); -} + image: url(":/images/default/arrow-down-pressed"); } QSpinBox::down-arrow:disabled { - image: url(":/images/default/arrow-down-disabled"); -} + image: url(":/images/default/arrow-down-disabled"); } /* ****************************************************************************************************************** */ QPushButton { - height: 15ex; - min-width: 30ex; - border: 1px solid #c4c4c4; - background-color: white; -} + height: 15ex; + min-width: 35ex; + border: 1px solid #c4c4c4; + background-color: white; + padding-left: 5ex; + padding-right: 5ex; } QPushButton:disabled { - background-color: #f0f0f0; - color: #c4c4c4; -} + background-color: #f0f0f0; + color: #c4c4c4; } QPushButton:hover { - border: 1px solid #3297FD; - color: #3297FD; -} + border: 1px solid #3297FD; + color: #3297FD; } QPushButton:pressed { - border: 1px solid #3297FD; - color: #0264c7; -} + border: 1px solid #3297FD; + color: #0264c7; } /* ****************************************************************************************************************** */ QListView { - background-color: white; - border: 1px solid #c4c4c4; -} + background-color: white; + border: 1px solid #c4c4c4; } QListView, QTableView, QTreeView { - alternate-background-color: #e4e4ec; - selection-background-color: #B4D5FE; - selection-color: #504040; -} + alternate-background-color: #e4e4ec; + selection-background-color: #B4D5FE; + selection-color: #504040; } QTreeView::branch { - padding: 5ex 0 5ex 0; - selection-background-color: #B4D5FE; - border-bottom: 1px solid #c4c4c4; -} + padding: 5ex 0 5ex 0; + selection-background-color: #B4D5FE; + border-bottom: 1px solid #c4c4c4; } QTreeView::branch:selected { - background-color: #B4D5FE; -} + background-color: #B4D5FE; } QTreeView::branch:open:has-children { - border-image: none; - image: url(":/images/default/arrow-down"); -} + border-image: none; + image: url(":/images/default/arrow-down"); } QTreeView::branch:closed:has-children { - border-image: none; - image: url(":/images/default/arrow-right"); -} + border-image: none; + image: url(":/images/default/arrow-right"); } QListView::item, QTableView::item, QTreeView::item { - height: 15ex; - border-bottom: 1px solid #c4c4c4; -} + height: 15ex; + border-bottom: 1px solid #c4c4c4; } QListView::item:selected, QTableView::item:selected, QTreeView::item:selected { - background-color: #B4D5FE; -} + background-color: #B4D5FE; } QTreeView::indicator { - width: 9ex; - height: 9ex; - background-color: transparent; - border: 1px solid transparent; - padding: 1px; - margin: 0; -} + width: 9ex; + height: 9ex; + background-color: transparent; + border: 1px solid transparent; + padding: 1px; + margin: 0; } -QTreeView::indicator:hover, QTreeView::indicator:checked, QTreeView::indicator:indeterminate { - background-color: white; - border: 1px solid #c4c4c4; -} +QTreeView::indicator:hover { + background-color: white; + border: 1px solid #c4c4c4; } QTreeView::indicator:checked { - image: url(":/images/default/check"); -} + background-color: #3297FD; + border: 1px solid #198afd; + image: url(":/images/default/check"); } QTreeView::indicator:checked:disabled { - image: url(":/images/default/check-disabled"); -} + background-color: #B4D5FE; + border: 1px solid #9bc7fe; + image: url(":/images/default/check-disabled"); } QTreeView::indicator:indeterminate { - image: url(":/images/default/partial-check"); -} + background-color: #3297FD; + border: 1px solid #198afd; + image: url(":/images/default/partial-check"); } QTreeView::indicator:indeterminate:disabled { - image: url(":/images/default/partial-check-disabled"); -} + background-color: #B4D5FE; + border: 1px solid #9bc7fe; + image: url(":/images/default/partial-check-disabled"); } /* ****************************************************************************************************************** */ QMenu { - background-color: white; - border: 1px solid #c4c4c4; - padding: 2ex 1ex 2ex 1ex; -} + background-color: white; + border: 1px solid #c4c4c4; + padding: 2ex 1ex 2ex 1ex; } QMenu::item { - height: 15ex; - padding-left: 15ex; - padding-right: 5ex; - border: 1px solid transparent; - /* reserve space for selection border */; -} + height: 15ex; + padding-left: 15ex; + padding-right: 5ex; + border: 1px solid transparent; + /* reserve space for selection border */ } QMenu::item:selected { - border: 1px solid transparent; - background-color: #B4D5FE; - color: #504040; -} + border: 1px solid transparent; + background-color: #B4D5FE; + color: #504040; } QMenu::icon { - width: 8ex; - height: 8ex; - background: none; - border: 1px inset transparent; - padding: 1px; - margin: 0 0 0 2ex; -} + width: 8ex; + height: 8ex; + background: none; + border: 1px inset transparent; + padding: 0; + margin: 0 1ex 0 2ex; } QMenu::icon:checked { /* appearance of a 'checked' icon */ - background-color: #dddddd; - border: 1px inset #aaaaaa; -} + background-color: #dddddd; + border: 1px inset #aaaaaa; } QMenu::separator { - height: 1px; - background: #c4c4c4; - margin-left: 4ex; - margin-right: 4ex; -} + height: 1px; + background: #c4c4c4; + margin-left: 4ex; + margin-right: 4ex; } QMenu::indicator { - width: 9ex; - height: 9ex; - background-color: white; - border: 1px solid #c4c4c4; - padding: 1px; - margin: 0 0 0 2ex; -} + width: 9ex; + height: 9ex; + background-color: white; + border: 1px solid #c4c4c4; + padding: 1px; + margin: 0 0 0 2ex; } QMenu::indicator:non-exclusive:checked { - image: url(":/images/default/check"); -} + background-color: #3297FD; + border: 1px solid #198afd; + image: url(":/images/default/check"); } QMenu::indicator:non-exclusive:checked:disabled { - image: url(":/images/default/check-disabled"); -} + background-color: #B4D5FE; + border: 1px solid #9bc7fe; + image: url(":/images/default/check-disabled"); } QMenu::indicator:exclusive { - border-radius: 5ex; -} + border-radius: 5ex; } QMenu::indicator:exclusive:checked { - image: url(":/images/default/radio-check"); -} + image: url(":/images/default/radio-check"); } QMenu::indicator:exclusive:checked:disabled { - image: url(":/images/default/radio-check-disabled"); -} + image: url(":/images/default/radio-check-disabled"); } /* ****************************************************************************************************************** */ QHeaderView::section { - height: 15.3ex; - width: 60ex; - min-width: 40ex; - background: #eeeeee; -} + height: 15.3ex; + width: 60ex; + min-width: 40ex; + background: #eeeeee; } /* ****************************************************************************************************************** */ DockWidget QWidget#EasyDockWidgetTitle { - background-color: #686464; -} - -DockWidget QWidget#EasyDockWidgetTitle QLabel { - color: white; - margin-left: 4px; -} - -DockWidget QWidget#EasyDockWidgetTitle QPushButton { - background: none; - border: none; - max-height: 8ex; - min-width: 8ex; - max-width: 8ex; - margin-right: 3ex; - padding: 0; -} - -DockWidget QWidget#EasyDockWidgetTitle QPushButton#EasyDockWidgetFloatButton { - image: url(":/images/default/dock-maximize-white"); -} - -DockWidget QWidget#EasyDockWidgetTitle QPushButton#EasyDockWidgetFloatButton:hover { - image: url(":/images/default/dock-maximize-white-hover"); -} - -DockWidget QWidget#EasyDockWidgetTitle QPushButton#EasyDockWidgetFloatButton:pressed { - image: url(":/images/default/dock-maximize-white-pressed"); -} - -DockWidget QWidget#EasyDockWidgetTitle QPushButton#EasyDockWidgetFloatButton[floating=true] { - image: url(":/images/default/dock-minimize-white"); -} - -DockWidget QWidget#EasyDockWidgetTitle QPushButton#EasyDockWidgetFloatButton[floating=true]:hover { - image: url(":/images/default/dock-minimize-white-hover"); -} - -DockWidget QWidget#EasyDockWidgetTitle QPushButton#EasyDockWidgetFloatButton[floating=true]:pressed { - image: url(":/images/default/dock-minimize-white-pressed"); -} - -DockWidget QWidget#EasyDockWidgetTitle QPushButton#EasyDockWidgetCloseButton { - image: url(":/images/default/dock-close-white"); -} - -DockWidget QWidget#EasyDockWidgetTitle QPushButton#EasyDockWidgetCloseButton:hover { - image: url(":/images/default/dock-close-white-hover"); -} - -DockWidget QWidget#EasyDockWidgetTitle QPushButton#EasyDockWidgetCloseButton:pressed { - image: url(":/images/default/dock-close-white-pressed"); -} + background-color: #686464; } + DockWidget QWidget#EasyDockWidgetTitle QLabel { + color: white; + margin-left: 4px; } + DockWidget QWidget#EasyDockWidgetTitle QPushButton { + background: none; + border: none; + max-height: 8ex; + min-width: 8ex; + max-width: 8ex; + margin-right: 3ex; + padding: 0; } + DockWidget QWidget#EasyDockWidgetTitle QPushButton#EasyDockWidgetFloatButton { + image: url(":/images/default/dock-maximize-white"); } + DockWidget QWidget#EasyDockWidgetTitle QPushButton#EasyDockWidgetFloatButton:hover { + image: url(":/images/default/dock-maximize-white-hover"); } + DockWidget QWidget#EasyDockWidgetTitle QPushButton#EasyDockWidgetFloatButton:pressed { + image: url(":/images/default/dock-maximize-white-pressed"); } + DockWidget QWidget#EasyDockWidgetTitle QPushButton#EasyDockWidgetFloatButton[floating=true] { + image: url(":/images/default/dock-minimize-white"); } + DockWidget QWidget#EasyDockWidgetTitle QPushButton#EasyDockWidgetFloatButton[floating=true]:hover { + image: url(":/images/default/dock-minimize-white-hover"); } + DockWidget QWidget#EasyDockWidgetTitle QPushButton#EasyDockWidgetFloatButton[floating=true]:pressed { + image: url(":/images/default/dock-minimize-white-pressed"); } + DockWidget QWidget#EasyDockWidgetTitle QPushButton#EasyDockWidgetCloseButton { + image: url(":/images/default/dock-close-white"); } + DockWidget QWidget#EasyDockWidgetTitle QPushButton#EasyDockWidgetCloseButton:hover { + image: url(":/images/default/dock-close-white-hover"); } + DockWidget QWidget#EasyDockWidgetTitle QPushButton#EasyDockWidgetCloseButton:pressed { + image: url(":/images/default/dock-close-white-pressed"); } /* ****************************************************************************************************************** */ QProgressBar { - background-color: #a4a4b4; - border: none; - color: white; - text-align: center; - height: 14ex; -} + background-color: #a4a4b4; + border: none; + color: white; + text-align: center; + height: 14ex; } QProgressBar::chunk { - background-color: #3297FD; - width: 2px; - margin: 0; -} + background-color: #3297FD; + width: 2px; + margin: 0; } /* ****************************************************************************************************************** */ QScrollBar { - background-color: transparent; - border: none; - padding: 0; -} + background-color: transparent; + border: none; + padding: 0; } QScrollBar:hover { - background-color: rgba(0, 0, 0, 0.1); -} + background-color: rgba(0, 0, 0, 0.1); } QScrollBar:horizontal { - margin: 0; - height: 5ex; -} + margin: 0; + height: 5ex; } QScrollBar:vertical { - margin: 0; - width: 5ex; -} + margin: 0; + width: 5ex; } QScrollBar::handle { - background-color: rgba(0, 0, 0, 0.4); - border: none; - margin: 0; - padding: 0; -} + background-color: rgba(0, 0, 0, 0.4); + border: none; + margin: 0; + padding: 0; } QScrollBar::handle:pressed { - background-color: rgba(0, 0, 0, 0.6); -} + background-color: rgba(0, 0, 0, 0.6); } QScrollBar::handle:vertical { - min-height: 20ex; - margin-left: 3ex; -} + min-height: 20ex; + margin-left: 3ex; } QScrollBar::handle:vertical:hover, QScrollBar::handle:vertical:pressed { - margin-left: 0; -} + margin-left: 0; } QScrollBar::handle:horizontal { - min-width: 20ex; - margin-top: 3ex; -} + min-width: 20ex; + margin-top: 3ex; } QScrollBar::handle:horizontal:hover, QScrollBar::handle:horizontal:pressed { - margin-top: 0; -} + margin-top: 0; } QScrollBar::add-line, QScrollBar::sub-line { - background: none; - border: none; -} + background: none; + border: none; } diff --git a/profiler_gui/themes/default.scss b/profiler_gui/themes/default.scss index e7895f6..8db15b0 100644 --- a/profiler_gui/themes/default.scss +++ b/profiler_gui/themes/default.scss @@ -34,6 +34,12 @@ $TreeViewSelectionTextColor: $TextColor; $BackgroundColor: white; $DisabledBackgroundColor: #f0f0f0; +$IndicatorBackgroundColor: $DarkSelectionColor; +$IndicatorBorderColor: darken($DarkSelectionColor, 5%); + +$DisabledIndicatorBackgroundColor: $SelectionColor; +$DisabledIndicatorBorderColor: darken($SelectionColor, 5%); + $ButtonHoverColor: $DarkSelectionColor;//#922c2c; $ButtonPressedColor: darken($DarkSelectionColor, 20%);//#370400; @@ -220,9 +226,11 @@ QSpinBox::down-arrow:disabled { /* ****************************************************************************************************************** */ QPushButton { height: $InputHeight; - min-width: 30ex; + min-width: 35ex; border: 1px solid $BorderColor; background-color: $BackgroundColor; + padding-left: 5ex; + padding-right: 5ex; } QPushButton:disabled { @@ -291,24 +299,32 @@ QTreeView::indicator { margin: 0; } -QTreeView::indicator:hover, QTreeView::indicator:checked, QTreeView::indicator:indeterminate { +QTreeView::indicator:hover { background-color: $BackgroundColor; border: 1px solid $BorderColor; } QTreeView::indicator:checked { + background-color: $IndicatorBackgroundColor; + border: 1px solid $IndicatorBorderColor; image: url(":/images/default/check"); } QTreeView::indicator:checked:disabled { + background-color: $DisabledIndicatorBackgroundColor; + border: 1px solid $DisabledIndicatorBorderColor; image: url(":/images/default/check-disabled"); } QTreeView::indicator:indeterminate { + background-color: $IndicatorBackgroundColor; + border: 1px solid $IndicatorBorderColor; image: url(":/images/default/partial-check"); } QTreeView::indicator:indeterminate:disabled { + background-color: $DisabledIndicatorBackgroundColor; + border: 1px solid $DisabledIndicatorBorderColor; image: url(":/images/default/partial-check-disabled"); } @@ -337,8 +353,8 @@ QMenu::icon { height: 8ex; background: none; border: 1px inset transparent; - padding: 1px; - margin: 0 0 0 2ex; + padding: 0; + margin: 0 1ex 0 2ex; } QMenu::icon:checked { /* appearance of a 'checked' icon */ @@ -363,10 +379,14 @@ QMenu::indicator { } QMenu::indicator:non-exclusive:checked { + background-color: $IndicatorBackgroundColor; + border: 1px solid $IndicatorBorderColor; image: url(":/images/default/check"); } QMenu::indicator:non-exclusive:checked:disabled { + background-color: $DisabledIndicatorBackgroundColor; + border: 1px solid $DisabledIndicatorBorderColor; image: url(":/images/default/check-disabled"); }