From 43df2d8636d424e3c56aa870a63de27515789c80 Mon Sep 17 00:00:00 2001 From: Victor Zarubkin Date: Mon, 20 Nov 2017 23:34:45 +0300 Subject: [PATCH] #0 [GUI] Styling --- profiler_gui/blocks_tree_widget.cpp | 18 +- profiler_gui/default.css | 254 ++++++++++------- profiler_gui/default.scss | 265 ++++++++++++++++++ profiler_gui/descriptors_tree_widget.cpp | 12 +- profiler_gui/easy_frame_rate_viewer.cpp | 2 +- profiler_gui/icons/attribution.txt | 3 +- profiler_gui/icons/check-disabled.svg | 2 +- profiler_gui/icons/check.svg | 2 +- profiler_gui/icons/close-white-hover.svg | 4 +- profiler_gui/icons/close-white-pressed.svg | 4 +- profiler_gui/icons/combo-arrow-disabled.svg | 12 + profiler_gui/icons/combo-arrow.svg | 12 + .../icons/radio-indicator-disabled.svg | 2 +- profiler_gui/icons/radio-indicator.svg | 2 +- profiler_gui/main.cpp | 2 +- profiler_gui/main_window.cpp | 34 +-- profiler_gui/resources.qrc | 82 +++--- 17 files changed, 521 insertions(+), 191 deletions(-) create mode 100644 profiler_gui/default.scss create mode 100644 profiler_gui/icons/combo-arrow-disabled.svg create mode 100644 profiler_gui/icons/combo-arrow.svg diff --git a/profiler_gui/blocks_tree_widget.cpp b/profiler_gui/blocks_tree_widget.cpp index f3ab80b..43ffbc0 100644 --- a/profiler_gui/blocks_tree_widget.cpp +++ b/profiler_gui/blocks_tree_widget.cpp @@ -590,11 +590,11 @@ void EasyTreeWidget::contextMenuEvent(QContextMenuEvent* _event) { action = menu.addAction("Expand all"); connect(action, &QAction::triggered, this, &This::onExpandAllClicked); - action->setIcon(QIcon(":/Expand")); + action->setIcon(QIcon(":/images/expand")); action = menu.addAction("Collapse all"); connect(action, &QAction::triggered, this, &This::onCollapseAllClicked); - action->setIcon(QIcon(":/Collapse")); + action->setIcon(QIcon(":/images/collapse")); if (item != nullptr && col >= 0) { @@ -602,11 +602,11 @@ void EasyTreeWidget::contextMenuEvent(QContextMenuEvent* _event) action = menu.addAction("Expand all children"); connect(action, &QAction::triggered, this, &This::onExpandAllChildrenClicked); - action->setIcon(QIcon(":/Expand")); + action->setIcon(QIcon(":/images/expand")); action = menu.addAction("Collapse all children"); connect(action, &QAction::triggered, this, &This::onCollapseAllChildrenClicked); - action->setIcon(QIcon(":/Collapse")); + action->setIcon(QIcon(":/images/collapse")); } menu.addSeparator(); @@ -638,11 +638,11 @@ void EasyTreeWidget::contextMenuEvent(QContextMenuEvent* _event) auto f = action->font(); f.setBold(true); action->setFont(f); - action->setIcon(QIcon(":/Color")); + action->setIcon(QIcon(":/images/color")); } else { - action->setIcon(QIcon(":/NoColor")); + action->setIcon(QIcon(":/images/no-color")); } if (item != nullptr && item->parent() != nullptr) @@ -1156,7 +1156,7 @@ EasyHierarchyWidget::EasyHierarchyWidget(QWidget* _parent) : Parent(_parent) QMenu* menu = new QMenu(this); m_searchButton = menu->menuAction(); m_searchButton->setText("Find next"); - m_searchButton->setIcon(QIcon(":/Search-next")); + m_searchButton->setIcon(QIcon(":/images/find-next")); m_searchButton->setData(true); connect(m_searchButton, &QAction::triggered, this, &This::findNext); @@ -1296,7 +1296,7 @@ void EasyHierarchyWidget::findNextFromMenu(bool _checked) { m_searchButton->setData(true); m_searchButton->setText(tr("Find next")); - m_searchButton->setIcon(QIcon(":/Search-next")); + m_searchButton->setIcon(QIcon(":/images/find-next")); disconnect(m_searchButton, &QAction::triggered, this, &This::findPrev); connect(m_searchButton, &QAction::triggered, this, &This::findNext); } @@ -1313,7 +1313,7 @@ void EasyHierarchyWidget::findPrevFromMenu(bool _checked) { m_searchButton->setData(false); m_searchButton->setText(tr("Find prev")); - m_searchButton->setIcon(QIcon(":/Search-prev")); + m_searchButton->setIcon(QIcon(":/images/find-prev")); disconnect(m_searchButton, &QAction::triggered, this, &This::findNext); connect(m_searchButton, &QAction::triggered, this, &This::findPrev); } diff --git a/profiler_gui/default.css b/profiler_gui/default.css index 457f3df..f7d68fd 100644 --- a/profiler_gui/default.css +++ b/profiler_gui/default.css @@ -2,100 +2,139 @@ * * * Light theme for EasyProfiler. * * * +* Automatically generated from * +* default.scss by pysassc tool * +* * ***********************************/ - - /* ****************************************************************************************************************** */ +/* Functions */ +/* ****************************************************************************************************************** */ +/* Constants */ +/* ****************************************************************************************************************** */ +/* StyleSheet */ * { - font-family: "DejaVu Sans"; - font-size: 13px; - color: #606070; -} + font-family: "DejaVu Sans"; + font-size: 13px; + color: #686060; } *:disabled { - color: #b0b0c0; -} - - - + color: #b8b0b0; } +EasyMainWindow, QToolBar, QDialog { + background-color: #fffbfb; } /* ****************************************************************************************************************** */ -QLineEdit, QPushButton { - height: 24px; - border: 1px solid #cccccc; - background-color: white; -} +QLineEdit, QComboBox { + height: 24px; + border: 1px solid #cccccc; + background-color: white; + selection-background-color: rgba(152, 206, 152, 0.4); + selection-color: #686060; } -QLineEdit:focus { border: 1px ridge #f44336; } +QLineEdit:disabled, QComboBox:disabled { + background-color: #dddddd; + color: #b8b0b0; + selection-background-color: rgba(152, 206, 152, 0.4); + selection-color: #b8b0b0; } -QPushButton { padding: 2px 5px 2px 5px; } -QPushButton:hover { border: 1px solid #f4a386; color: #806070; } -QPushButton:pressed { border: 1px solid #d47366; color: #705060; } +QLineEdit:focus { + border: 1px solid #ffbcbc; } + +QComboBox::drop-down { + subcontrol-origin: padding; + subcontrol-position: top right; + width: 20px; + border-left: none; + margin-left: 0; } + +QComboBox::down-arrow { + image: url(":/images/combo-arrow"); + height: 8px; + width: 8px; } + +QComboBox::down-arrow:disabled { + image: url(":/images/combo-arrow-disabled"); + height: 8px; + width: 8px; } + +QPushButton { + height: 24px; + border: 1px solid #cccccc; + background-color: white; + padding: 0 5px 0 5px; } + +QPushButton:hover { + border: 1px solid #ffbcbc; + color: #d77d7d; } + +QPushButton:pressed { + border: 1px solid #d77d7d; + color: #922c2c; } QComboBox QListView { - background-color: white; - border: 1px solid #cccccc; - selection-background-color: rgba(96, 112, 208, 64); -} + background-color: white; + border: 1px solid #cccccc; + selection-background-color: rgba(152, 206, 152, 0.4); + selection-color: #686060; } /* ****************************************************************************************************************** */ QMenu { - background-color: white; - padding-top: 4px; - padding-bottom: 4px; -} + background-color: white; + border: 1px solid #cccccc; + padding-top: 4px; + padding-bottom: 4px; } QMenu::item { - height: 22px; - padding: 0 16px 0 25px; - border: 1px solid transparent; /* reserve space for selection border */ -} + height: 22px; + padding: 0 16px 0 25px; + border: 1px solid transparent; + /* reserve space for selection border */ } QMenu::item:selected { - border-color: rgba(96, 112, 208, 128); - background: rgba(96, 112, 208, 64); -} + border: 1px solid rgba(152, 206, 152, 0.4); + background-color: rgba(152, 206, 152, 0.4); } QMenu::icon { - width: 12px; - height: 12px; - background: none; - border: 1px inset transparent; - padding: 1px; - margin-left: 2px; -} + width: 12px; + height: 12px; + background: none; + border: 1px inset transparent; + padding: 1px; + margin-left: 2px; } -QMenu::icon:checked { /* appearance of a 'checked' icon */ - background-color: #dddddd; - border: 1px inset #aaaaaa; -} +QMenu::icon:checked { + /* appearance of a 'checked' icon */ + background-color: #dddddd; + border: 1px inset #aaaaaa; } QMenu::separator { - height: 1px; - background: #cccccc; - margin-left: 5px; - margin-right: 5px; -} + height: 1px; + background: #cccccc; + margin-left: 5px; + margin-right: 5px; } QMenu::indicator { - width: 14px; - height: 14px; - background-color: white; - border: 1px solid #cccccc; - margin-left: 2px; - padding: 1px; -} + width: 14px; + height: 14px; + background-color: white; + border: 1px solid #cccccc; + margin-left: 2px; + padding: 1px; } -QMenu::indicator:non-exclusive:checked { image: url(":/CheckIndicator"); } -QMenu::indicator:non-exclusive:checked:disabled { image: url(":/CheckIndicatorDisabled"); } +QMenu::indicator:non-exclusive:checked { + image: url(":/images/check"); } -QMenu::indicator:exclusive { border-radius: 8px; } -QMenu::indicator:exclusive:checked { image: url(":/RadioIndicator"); } -QMenu::indicator:exclusive:checked:disabled { image: url(":/RadioIndicatorDisabled"); } +QMenu::indicator:non-exclusive:checked:disabled { + image: url(":/images/check-disabled"); } +QMenu::indicator:exclusive { + border-radius: 8px; } +QMenu::indicator:exclusive:checked { + image: url(":/images/radio-check"); } +QMenu::indicator:exclusive:checked:disabled { + image: url(":/images/radio-check-disabled"); } /* ****************************************************************************************************************** */ /*QToolButton { @@ -105,7 +144,7 @@ QMenu::indicator:exclusive:checked:disabled { image: url(":/RadioIndicatorDisabl } QToolButton:hover { - border: 1px solid #cccccc; + border: 1px solid $BorderColor; } QToolButton[popupMode="1"] { @@ -123,70 +162,67 @@ QToolButton::menu-button { } QToolButton::menu-button:hover { - border-left: 1px solid #cccccc; + border-left: 1px solid $BorderColor; background-color: #bbbbbb; } QToolButton::menu-button:pressed { - border-left: 1px solid #cccccc; + border-left: 1px solid $BorderColor; background-color: #808080; }*/ - - - - - - /* ****************************************************************************************************************** */ QHeaderView::section { - height: 28px; - width: 96px; - min-width: 64px; - background: #eeeeee; -} - - - - + height: 28px; + width: 96px; + min-width: 64px; + background: #eeeeee; } /* ****************************************************************************************************************** */ EasyDockWidget QWidget#EasyDockWidgetTitle { - background-color: #666666; -} - -EasyDockWidget QWidget#EasyDockWidgetTitle QLabel { + background-color: #686464; } + EasyDockWidget QWidget#EasyDockWidgetTitle QLabel { color: white; - margin-left: 4px; -} - -EasyDockWidget QWidget#EasyDockWidgetTitle QPushButton { + margin-left: 4px; } + EasyDockWidget QWidget#EasyDockWidgetTitle QPushButton { background: none; border: none; max-height: 12px; max-width: 12px; margin-right: 4px; - padding: 0; -} - -EasyDockWidget QWidget#EasyDockWidgetTitle QPushButton#EasyDockWidgetFloatButton { image: url(":/DockMaximizeWhite"); } -EasyDockWidget QWidget#EasyDockWidgetTitle QPushButton#EasyDockWidgetFloatButton:hover { image: url(":/DockMaximizeWhiteHover"); } -EasyDockWidget QWidget#EasyDockWidgetTitle QPushButton#EasyDockWidgetFloatButton:pressed { image: url(":/DockMaximizeWhitePressed"); } - -EasyDockWidget QWidget#EasyDockWidgetTitle QPushButton#EasyDockWidgetFloatButton[floating=true] { image: url(":/DockMinimizeWhite"); } -EasyDockWidget QWidget#EasyDockWidgetTitle QPushButton#EasyDockWidgetFloatButton[floating=true]:hover { image: url(":/DockMinimizeWhiteHover"); } -EasyDockWidget QWidget#EasyDockWidgetTitle QPushButton#EasyDockWidgetFloatButton[floating=true]:pressed { image: url(":/DockMinimizeWhitePressed"); } - -EasyDockWidget QWidget#EasyDockWidgetTitle QPushButton#EasyDockWidgetCloseButton { image: url(":/DockCloseWhite"); } -EasyDockWidget QWidget#EasyDockWidgetTitle QPushButton#EasyDockWidgetCloseButton:hover { image: url(":/DockCloseWhiteHover"); } -EasyDockWidget QWidget#EasyDockWidgetTitle QPushButton#EasyDockWidgetCloseButton:pressed { image: url(":/DockCloseWhitePressed"); } - - + padding: 0; } + EasyDockWidget QWidget#EasyDockWidgetTitle QPushButton#EasyDockWidgetFloatButton { + image: url(":/images/dock-maximize-white"); } + EasyDockWidget QWidget#EasyDockWidgetTitle QPushButton#EasyDockWidgetFloatButton:hover { + image: url(":/images/dock-maximize-white-hover"); } + EasyDockWidget QWidget#EasyDockWidgetTitle QPushButton#EasyDockWidgetFloatButton:pressed { + image: url(":/images/dock-maximize-white-pressed"); } + EasyDockWidget QWidget#EasyDockWidgetTitle QPushButton#EasyDockWidgetFloatButton[floating=true] { + image: url(":/images/dock-minimize-white"); } + EasyDockWidget QWidget#EasyDockWidgetTitle QPushButton#EasyDockWidgetFloatButton[floating=true]:hover { + image: url(":/images/dock-minimize-white-hover"); } + EasyDockWidget QWidget#EasyDockWidgetTitle QPushButton#EasyDockWidgetFloatButton[floating=true]:pressed { + image: url(":/images/dock-minimize-white-pressed"); } + EasyDockWidget QWidget#EasyDockWidgetTitle QPushButton#EasyDockWidgetCloseButton { + image: url(":/images/dock-close-white"); } + EasyDockWidget QWidget#EasyDockWidgetTitle QPushButton#EasyDockWidgetCloseButton:hover { + image: url(":/images/dock-close-white-hover"); } + EasyDockWidget QWidget#EasyDockWidgetTitle QPushButton#EasyDockWidgetCloseButton:pressed { + image: url(":/images/dock-close-white-pressed"); } /* ****************************************************************************************************************** */ QWidget#DiagramPopup, QWidget#ThreadsPopup { - background-color: white; - border: 1px solid #cccccc; -} - + background-color: white; + border: 1px solid #cccccc; } +/* ****************************************************************************************************************** */ +QProgressBar { + height: 24px; + background-color: white; + border: 1px solid #64BC64; + color: #0B530B; + text-align: center; } +QProgressBar::chunk { + background-color: #98DE98; + width: 2px; + margin: 0; } diff --git a/profiler_gui/default.scss b/profiler_gui/default.scss new file mode 100644 index 0000000..2dd32ff --- /dev/null +++ b/profiler_gui/default.scss @@ -0,0 +1,265 @@ +/********************************** +* * +* Light theme for EasyProfiler. * +* * +* Automatically generated from * +* default.scss by pysassc tool * +* * +***********************************/ + +/* ****************************************************************************************************************** */ +/* Functions */ +@function rgb_a($color, $opacity) { + @return fade_out($color, 1.0 - $opacity); +} + +/* ****************************************************************************************************************** */ +/* Constants */ +$TextColor: #686060; +$DisabledTextColor: #b8b0b0; +$BorderColor: #cccccc; +$MainColor: #f44336; +$HoveredMenuRowColor: rgb_a(#98CE98, 0.4); +$BackgroundColor: white; +$DisabledBackgroundColor: #dddddd; +$ButtonHoverColor: #d77d7d; +$ButtonPressedColor: #922c2c; + +/* ****************************************************************************************************************** */ +/* StyleSheet */ + +* { + font-family: "DejaVu Sans"; + font-size: 13px; + color: $TextColor; +} + +*:disabled { + color: $DisabledTextColor; +} + +EasyMainWindow, QToolBar, QDialog { + background-color: #fffbfb; +} + + + +/* ****************************************************************************************************************** */ +QLineEdit, QComboBox { + height: 24px; + border: 1px solid $BorderColor; + background-color: $BackgroundColor; + selection-background-color: $HoveredMenuRowColor; + selection-color: $TextColor; +} + +QLineEdit:disabled, QComboBox:disabled { + background-color: $DisabledBackgroundColor; + color: $DisabledTextColor; + selection-background-color: $HoveredMenuRowColor; + selection-color: $DisabledTextColor; +} + +QLineEdit:focus { border: 1px solid #ffbcbc; } + +QComboBox::drop-down { + subcontrol-origin: padding; + subcontrol-position: top right; + width: 20px; + border-left: none; + margin-left: 0; +} + +QComboBox::down-arrow { image: url(":/images/combo-arrow"); height: 8px; width: 8px; } +QComboBox::down-arrow:disabled { image: url(":/images/combo-arrow-disabled"); height: 8px; width: 8px; } + +QPushButton { + height: 24px; + border: 1px solid $BorderColor; + background-color: $BackgroundColor; + padding: 0 5px 0 5px; +} + +QPushButton:hover { + border: 1px solid #ffbcbc; + color: $ButtonHoverColor; +} + +QPushButton:pressed { + border: 1px solid $ButtonHoverColor; + color: $ButtonPressedColor; +} + +QComboBox QListView { + background-color: $BackgroundColor; + border: 1px solid $BorderColor; + selection-background-color: $HoveredMenuRowColor; + selection-color: $TextColor; +} + +/* ****************************************************************************************************************** */ +QMenu { + background-color: $BackgroundColor; + border: 1px solid $BorderColor; + padding-top: 4px; + padding-bottom: 4px; +} + +QMenu::item { + height: 22px; + padding: 0 16px 0 25px; + border: 1px solid transparent; /* reserve space for selection border */ +} + +QMenu::item:selected { + border: 1px solid $HoveredMenuRowColor; + background-color: $HoveredMenuRowColor; +} + +QMenu::icon { + width: 12px; + height: 12px; + background: none; + border: 1px inset transparent; + padding: 1px; + margin-left: 2px; +} + +QMenu::icon:checked { /* appearance of a 'checked' icon */ + background-color: #dddddd; + border: 1px inset #aaaaaa; +} + +QMenu::separator { + height: 1px; + background: $BorderColor; + margin-left: 5px; + margin-right: 5px; +} + +QMenu::indicator { + width: 14px; + height: 14px; + background-color: $BackgroundColor; + border: 1px solid $BorderColor; + margin-left: 2px; + padding: 1px; +} + +QMenu::indicator:non-exclusive:checked { image: url(":/images/check"); } +QMenu::indicator:non-exclusive:checked:disabled { image: url(":/images/check-disabled"); } + +QMenu::indicator:exclusive { border-radius: 8px; } +QMenu::indicator:exclusive:checked { image: url(":/images/radio-check"); } +QMenu::indicator:exclusive:checked:disabled { image: url(":/images/radio-check-disabled"); } + + + + +/* ****************************************************************************************************************** */ +/*QToolButton { + border: 1px solid transparent; + background: none; + padding: 2px; +} + +QToolButton:hover { + border: 1px solid $BorderColor; +} + +QToolButton[popupMode="1"] { + padding-right: 13px; +} + +QToolButton:pressed { + background-color: #808080; +} + +QToolButton::menu-button { + border: none; + border-left: 1px solid transparent; + width: 12px; +} + +QToolButton::menu-button:hover { + border-left: 1px solid $BorderColor; + background-color: #bbbbbb; +} + +QToolButton::menu-button:pressed { + border-left: 1px solid $BorderColor; + background-color: #808080; +}*/ + + + + + + +/* ****************************************************************************************************************** */ +QHeaderView::section { + height: 28px; + width: 96px; + min-width: 64px; + background: #eeeeee; +} + + + + + +/* ****************************************************************************************************************** */ +EasyDockWidget +{ + QWidget#EasyDockWidgetTitle + { + background-color: #686464; + + QLabel { + color: white; + margin-left: 4px; + } + + QPushButton { + background: none; + border: none; + max-height: 12px; + max-width: 12px; + margin-right: 4px; + padding: 0; + } + + QPushButton#EasyDockWidgetFloatButton { image: url(":/images/dock-maximize-white"); } + QPushButton#EasyDockWidgetFloatButton:hover { image: url(":/images/dock-maximize-white-hover"); } + QPushButton#EasyDockWidgetFloatButton:pressed { image: url(":/images/dock-maximize-white-pressed"); } + + QPushButton#EasyDockWidgetFloatButton[floating=true] { image: url(":/images/dock-minimize-white"); } + QPushButton#EasyDockWidgetFloatButton[floating=true]:hover { image: url(":/images/dock-minimize-white-hover"); } + QPushButton#EasyDockWidgetFloatButton[floating=true]:pressed { image: url(":/images/dock-minimize-white-pressed"); } + + QPushButton#EasyDockWidgetCloseButton { image: url(":/images/dock-close-white"); } + QPushButton#EasyDockWidgetCloseButton:hover { image: url(":/images/dock-close-white-hover"); } + QPushButton#EasyDockWidgetCloseButton:pressed { image: url(":/images/dock-close-white-pressed"); } + } +} + +/* ****************************************************************************************************************** */ +QWidget#DiagramPopup, QWidget#ThreadsPopup { + background-color: $BackgroundColor; + border: 1px solid $BorderColor; +} + +/* ****************************************************************************************************************** */ +QProgressBar { + height: 24px; + background-color: $BackgroundColor; + border: 1px solid #64BC64; + color: #0B530B; + text-align: center; +} + +QProgressBar::chunk { + background-color: #98DE98; + width: 2px; + margin: 0; +} diff --git a/profiler_gui/descriptors_tree_widget.cpp b/profiler_gui/descriptors_tree_widget.cpp index f5012df..ad3f1de 100644 --- a/profiler_gui/descriptors_tree_widget.cpp +++ b/profiler_gui/descriptors_tree_widget.cpp @@ -261,11 +261,11 @@ void EasyDescTreeWidget::contextMenuEvent(QContextMenuEvent* _event) QMenu menu; menu.setToolTipsVisible(true); auto action = menu.addAction("Expand all"); - action->setIcon(QIcon(":/Expand")); + action->setIcon(QIcon(":/images/expand")); connect(action, &QAction::triggered, this, &This::expandAll); action = menu.addAction("Collapse all"); - action->setIcon(QIcon(":/Collapse")); + action->setIcon(QIcon(":/images/collapse")); connect(action, &QAction::triggered, this, &This::collapseAll); menu.addSeparator(); @@ -744,7 +744,7 @@ EasyDescWidget::EasyDescWidget(QWidget* _parent) : Parent(_parent) auto tb = new QToolBar(this); tb->setIconSize(::profiler_gui::ICONS_SIZE); - auto refreshButton = tb->addAction(QIcon(":/Reload"), tr("Refresh blocks list")); + auto refreshButton = tb->addAction(QIcon(":/images/reload"), tr("Refresh blocks list")); refreshButton->setEnabled(EASY_GLOBALS.connected); refreshButton->setToolTip(tr("Refresh blocks list.\nConnection needed.")); connect(refreshButton, &QAction::triggered, &EASY_GLOBALS.events, &::profiler_gui::EasyGlobalSignals::blocksRefreshRequired); @@ -754,7 +754,7 @@ EasyDescWidget::EasyDescWidget(QWidget* _parent) : Parent(_parent) QMenu* menu = new QMenu(this); m_searchButton = menu->menuAction(); m_searchButton->setText("Find next"); - m_searchButton->setIcon(QIcon(":/Search-next")); + m_searchButton->setIcon(QIcon(":/images/find-next")); m_searchButton->setData(true); connect(m_searchButton, &QAction::triggered, this, &This::findNext); @@ -891,7 +891,7 @@ void EasyDescWidget::findNextFromMenu(bool _checked) { m_searchButton->setData(true); m_searchButton->setText(tr("Find next")); - m_searchButton->setIcon(QIcon(":/Search-next")); + m_searchButton->setIcon(QIcon(":/images/find-next")); disconnect(m_searchButton, &QAction::triggered, this, &This::findPrev); connect(m_searchButton, &QAction::triggered, this, &This::findNext); } @@ -908,7 +908,7 @@ void EasyDescWidget::findPrevFromMenu(bool _checked) { m_searchButton->setData(false); m_searchButton->setText(tr("Find prev")); - m_searchButton->setIcon(QIcon(":/Search-prev")); + m_searchButton->setIcon(QIcon(":/images/find-prev")); disconnect(m_searchButton, &QAction::triggered, this, &This::findNext); connect(m_searchButton, &QAction::triggered, this, &This::findPrev); } diff --git a/profiler_gui/easy_frame_rate_viewer.cpp b/profiler_gui/easy_frame_rate_viewer.cpp index 3c07af8..9006b01 100644 --- a/profiler_gui/easy_frame_rate_viewer.cpp +++ b/profiler_gui/easy_frame_rate_viewer.cpp @@ -324,7 +324,7 @@ void EasyFrameRateViewer::contextMenuEvent(QContextMenuEvent* _event) QMenu menu; QAction* action = nullptr; - action = menu.addAction(QIcon(":/Delete"), "Clear"); + action = menu.addAction(QIcon(":/images/delete"), "Clear"); connect(action, &QAction::triggered, [this](bool){ clear(); }); action = menu.addAction("Close"); diff --git a/profiler_gui/icons/attribution.txt b/profiler_gui/icons/attribution.txt index 675b5fa..35f7ba9 100644 --- a/profiler_gui/icons/attribution.txt +++ b/profiler_gui/icons/attribution.txt @@ -32,4 +32,5 @@ maximize-white-hover.svg - Icon made by Freepik from www.flaticon.com maximize-white-pressed.svg - Icon made by Freepik from www.flaticon.com minimize-white.svg - Icon made by Freepik from www.flaticon.com minimize-white-pressed.svg - Icon made by Freepik from www.flaticon.com - +combo-arrow.svg - Icon made by Freepik from www.flaticon.com +combo-arrow-disabled.svg - Icon made by Freepik from www.flaticon.com diff --git a/profiler_gui/icons/check-disabled.svg b/profiler_gui/icons/check-disabled.svg index d6d7f1c..53eb1f9 100644 --- a/profiler_gui/icons/check-disabled.svg +++ b/profiler_gui/icons/check-disabled.svg @@ -3,6 +3,6 @@ - + diff --git a/profiler_gui/icons/check.svg b/profiler_gui/icons/check.svg index 2d88e97..cc1eb65 100644 --- a/profiler_gui/icons/check.svg +++ b/profiler_gui/icons/check.svg @@ -3,6 +3,6 @@ - + diff --git a/profiler_gui/icons/close-white-hover.svg b/profiler_gui/icons/close-white-hover.svg index 2dcade2..d78f3d0 100644 --- a/profiler_gui/icons/close-white-hover.svg +++ b/profiler_gui/icons/close-white-hover.svg @@ -3,10 +3,10 @@ - - diff --git a/profiler_gui/icons/close-white-pressed.svg b/profiler_gui/icons/close-white-pressed.svg index 5f39552..6602d1c 100644 --- a/profiler_gui/icons/close-white-pressed.svg +++ b/profiler_gui/icons/close-white-pressed.svg @@ -3,10 +3,10 @@ - - diff --git a/profiler_gui/icons/combo-arrow-disabled.svg b/profiler_gui/icons/combo-arrow-disabled.svg new file mode 100644 index 0000000..46d7c82 --- /dev/null +++ b/profiler_gui/icons/combo-arrow-disabled.svg @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/profiler_gui/icons/combo-arrow.svg b/profiler_gui/icons/combo-arrow.svg new file mode 100644 index 0000000..643c8b7 --- /dev/null +++ b/profiler_gui/icons/combo-arrow.svg @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/profiler_gui/icons/radio-indicator-disabled.svg b/profiler_gui/icons/radio-indicator-disabled.svg index f667d5d..cb9540e 100644 --- a/profiler_gui/icons/radio-indicator-disabled.svg +++ b/profiler_gui/icons/radio-indicator-disabled.svg @@ -2,6 +2,6 @@ - + diff --git a/profiler_gui/icons/radio-indicator.svg b/profiler_gui/icons/radio-indicator.svg index 52ba580..76e0974 100644 --- a/profiler_gui/icons/radio-indicator.svg +++ b/profiler_gui/icons/radio-indicator.svg @@ -2,6 +2,6 @@ - + diff --git a/profiler_gui/main.cpp b/profiler_gui/main.cpp index cad8ac5..b418c48 100644 --- a/profiler_gui/main.cpp +++ b/profiler_gui/main.cpp @@ -63,7 +63,7 @@ int main(int argc, char **argv) { QApplication app(argc, argv); - QFile file(":/DefaultTheme"); + QFile file(":/themes/default"); if (file.open(QFile::ReadOnly | QFile::Text)) { QTextStream in(&file); diff --git a/profiler_gui/main_window.cpp b/profiler_gui/main_window.cpp index 765029a..f29d749 100644 --- a/profiler_gui/main_window.cpp +++ b/profiler_gui/main_window.cpp @@ -173,7 +173,7 @@ EasyDockWidget::~EasyDockWidget() EasyMainWindow::EasyMainWindow() : Parent(), m_lastAddress("localhost"), m_lastPort(::profiler::DEFAULT_PORT) { - { QIcon icon(":/logo"); if (!icon.isNull()) QApplication::setWindowIcon(icon); } + { QIcon icon(":/images/logo"); if (!icon.isNull()) QApplication::setWindowIcon(icon); } setObjectName("ProfilerGUI_MainWindow"); setWindowTitle(EASY_DEFAULT_WINDOW_TITLE); @@ -230,7 +230,7 @@ EasyMainWindow::EasyMainWindow() : Parent(), m_lastAddress("localhost"), m_lastP m_loadActionMenu = new QMenu(this); auto action = m_loadActionMenu->menuAction(); action->setText("Open file"); - action->setIcon(QIcon(":/Open")); + action->setIcon(QIcon(":/images/open")); connect(action, &QAction::triggered, this, &This::onOpenFileClicked); toolbar->addAction(action); @@ -241,8 +241,8 @@ EasyMainWindow::EasyMainWindow() : Parent(), m_lastAddress("localhost"), m_lastP m_loadActionMenu->addAction(action); } - m_saveAction = toolbar->addAction(QIcon(":/Save"), tr("Save"), this, SLOT(onSaveFileClicked(bool))); - m_deleteAction = toolbar->addAction(QIcon(":/Delete"), tr("Clear all"), this, SLOT(onDeleteClicked(bool))); + m_saveAction = toolbar->addAction(QIcon(":/images/save"), tr("Save"), this, SLOT(onSaveFileClicked(bool))); + m_deleteAction = toolbar->addAction(QIcon(":/images/delete"), tr("Clear all"), this, SLOT(onDeleteClicked(bool))); m_saveAction->setEnabled(false); m_deleteAction->setEnabled(false); @@ -254,12 +254,12 @@ EasyMainWindow::EasyMainWindow() : Parent(), m_lastAddress("localhost"), m_lastP toolbar->setObjectName("ProfilerGUI_ProfileToolbar"); toolbar->setContentsMargins(1, 0, 1, 0); - toolbar->addAction(QIcon(":/List"), tr("Blocks"), this, SLOT(onEditBlocksClicked(bool))); - m_captureAction = toolbar->addAction(QIcon(":/Start"), tr("Capture"), this, SLOT(onCaptureClicked(bool))); + toolbar->addAction(QIcon(":/images/list"), tr("Blocks"), this, SLOT(onEditBlocksClicked(bool))); + m_captureAction = toolbar->addAction(QIcon(":/images/start"), tr("Capture"), this, SLOT(onCaptureClicked(bool))); m_captureAction->setEnabled(false); toolbar->addSeparator(); - m_connectAction = toolbar->addAction(QIcon(":/Connection"), tr("Connect"), this, SLOT(onConnectClicked(bool))); + m_connectAction = toolbar->addAction(QIcon(":/images/connect"), tr("Connect"), this, SLOT(onConnectClicked(bool))); auto lbl = new QLabel("Address:", toolbar); lbl->setContentsMargins(5, 0, 2, 0); @@ -291,15 +291,15 @@ EasyMainWindow::EasyMainWindow() : Parent(), m_lastAddress("localhost"), m_lastP toolbar->setObjectName("ProfilerGUI_SetupToolbar"); toolbar->setContentsMargins(1, 0, 1, 0); - toolbar->addAction(QIcon(":/Expand"), "Expand all", this, SLOT(onExpandAllClicked(bool))); - toolbar->addAction(QIcon(":/Collapse"), "Collapse all", this, SLOT(onCollapseAllClicked(bool))); + toolbar->addAction(QIcon(":/images/expand"), "Expand all", this, SLOT(onExpandAllClicked(bool))); + toolbar->addAction(QIcon(":/images/collapse"), "Collapse all", this, SLOT(onCollapseAllClicked(bool))); toolbar->addSeparator(); auto menu = new QMenu("Settings", this); menu->setToolTipsVisible(true); QToolButton* toolButton = new QToolButton(toolbar); - toolButton->setIcon(QIcon(":/Settings")); + toolButton->setIcon(QIcon(":/images/settings")); toolButton->setMenu(menu); toolButton->setPopupMode(QToolButton::InstantPopup); toolbar->addWidget(toolButton); @@ -313,12 +313,12 @@ EasyMainWindow::EasyMainWindow() : Parent(), m_lastAddress("localhost"), m_lastP auto f = action->font(); f.setBold(true); action->setFont(f); - action->setIcon(QIcon(":/Stats")); + action->setIcon(QIcon(":/images/stats")); } else { action->setText("Statistics disabled"); - action->setIcon(QIcon(":/Stats-off")); + action->setIcon(QIcon(":/images/stats-off")); } @@ -1065,12 +1065,12 @@ void EasyMainWindow::onEnableDisableStatistics(bool _checked) if (_checked) { action->setText("Statistics enabled"); - action->setIcon(QIcon(":/Stats")); + action->setIcon(QIcon(":/images/stats")); } else { action->setText("Statistics disabled"); - action->setIcon(QIcon(":/Stats-off")); + action->setIcon(QIcon(":/images/stats-off")); } } } @@ -1424,7 +1424,7 @@ void EasyMainWindow::setDisconnected(bool _showMessage) EASY_GLOBALS.connected = false; m_captureAction->setEnabled(false); - m_connectAction->setIcon(QIcon(":/Connection")); + m_connectAction->setIcon(QIcon(":/images/connect")); m_connectAction->setText(tr("Connect")); m_eventTracingEnableAction->setEnabled(false); @@ -1964,7 +1964,7 @@ void EasyMainWindow::onConnectClicked(bool) qInfo() << "Connected successfully"; EASY_GLOBALS.connected = true; m_captureAction->setEnabled(true); - m_connectAction->setIcon(QIcon(":/Connection-on")); + m_connectAction->setIcon(QIcon(":/images/connected")); m_connectAction->setText(tr("Disconnect")); if (m_fpsViewer->isVisible()) @@ -2043,7 +2043,7 @@ void EasyMainWindow::onCaptureClicked(bool) button->setAutoRaise(true); button->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); button->setIconSize(::profiler_gui::ICONS_SIZE); - button->setIcon(QIcon(":/Stop")); + button->setIcon(QIcon(":/images/stop")); button->setText("Stop"); m_listenerDialog->addButton(button, QMessageBox::AcceptRole); diff --git a/profiler_gui/resources.qrc b/profiler_gui/resources.qrc index 7220183..f021579 100644 --- a/profiler_gui/resources.qrc +++ b/profiler_gui/resources.qrc @@ -1,43 +1,47 @@ - - default.css + + default.css + + icons/logo.svg - icons/off.svg - icons/open-folder2.svg - icons/reload-folder2.svg - icons/reload.svg - icons/expand.svg - icons/collapse.svg - icons/colors.svg - icons/colors-black.svg - icons/save.svg - icons/statistics.svg - icons/statistics2.svg - icons/lan.svg - icons/lan_on.svg - icons/wifi.svg - icons/wifi_on.svg - icons/lan.svg - icons/lan_on.svg - icons/play.svg - icons/stop.svg - icons/delete.svg - icons/list.svg - icons/search-next.svg - icons/search-prev.svg - icons/settings.svg - icons/check.svg - icons/check-disabled.svg - icons/radio-indicator.svg - icons/radio-indicator-disabled.svg - icons/maximize-white.svg - icons/maximize-white-hover.svg - icons/maximize-white-pressed.svg - icons/minimize-white.svg - icons/minimize-white-hover.svg - icons/minimize-white-pressed.svg - icons/close-white.svg - icons/close-white-hover.svg - icons/close-white-pressed.svg + icons/off.svg + icons/open-folder2.svg + icons/reload-folder2.svg + icons/reload.svg + icons/expand.svg + icons/collapse.svg + icons/colors.svg + icons/colors-black.svg + icons/save.svg + icons/statistics.svg + icons/statistics2.svg + icons/lan.svg + icons/lan_on.svg + icons/wifi.svg + icons/wifi_on.svg + icons/lan.svg + icons/lan_on.svg + icons/play.svg + icons/stop.svg + icons/delete.svg + icons/list.svg + icons/search-next.svg + icons/search-prev.svg + icons/settings.svg + icons/check.svg + icons/check-disabled.svg + icons/radio-indicator.svg + icons/radio-indicator-disabled.svg + icons/maximize-white.svg + icons/maximize-white-hover.svg + icons/maximize-white-pressed.svg + icons/minimize-white.svg + icons/minimize-white-hover.svg + icons/minimize-white-pressed.svg + icons/close-white.svg + icons/close-white-hover.svg + icons/close-white-pressed.svg + icons/combo-arrow.svg + icons/combo-arrow-disabled.svg