diff options
Diffstat (limited to 'src/plugins/qmldesigner/designmodewidget.cpp')
-rw-r--r-- | src/plugins/qmldesigner/designmodewidget.cpp | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/src/plugins/qmldesigner/designmodewidget.cpp b/src/plugins/qmldesigner/designmodewidget.cpp index 64b72c3291..d17bf5a10c 100644 --- a/src/plugins/qmldesigner/designmodewidget.cpp +++ b/src/plugins/qmldesigner/designmodewidget.cpp @@ -238,19 +238,32 @@ void DesignModeWidget::setup() m_dockManager->setStyleSheet(Theme::replaceCssColors(sheet)); // Setup icons - QColor buttonColor(Theme::getColor(Theme::QmlDesigner_TabLight)); // TODO Use correct color roles - QColor tabColor(Theme::getColor(Theme::QmlDesigner_TabDark)); + const QColor buttonColor(Theme::getColor(Theme::QmlDesigner_TabLight)); // TODO Use correct color roles + const QColor tabColor(Theme::getColor(Theme::QmlDesigner_TabDark)); const QString closeUnicode = Theme::getIconUnicode(Theme::Icon::adsClose); const QString menuUnicode = Theme::getIconUnicode(Theme::Icon::adsDropDown); const QString undockUnicode = Theme::getIconUnicode(Theme::Icon::adsDetach); const QString fontName = "qtds_propertyIconFont.ttf"; - const QIcon tabsCloseIcon = Utils::StyleHelper::getIconFromIconFont(fontName, closeUnicode, 28, 28, tabColor); const QIcon menuIcon = Utils::StyleHelper::getIconFromIconFont(fontName, menuUnicode, 28, 28, buttonColor); const QIcon undockIcon = Utils::StyleHelper::getIconFromIconFont(fontName, undockUnicode, 28, 28, buttonColor); const QIcon closeIcon = Utils::StyleHelper::getIconFromIconFont(fontName, closeUnicode, 28, 28, buttonColor); + auto closeIconNormal = Utils::StyleHelper::IconFontHelper(closeUnicode, + tabColor, + QSize(28, 28), + QIcon::Normal, + QIcon::Off); + + auto closeIconFocused = Utils::StyleHelper::IconFontHelper(closeUnicode, + Theme::getColor(Theme::DStextColor), + QSize(28, 28), + QIcon::Normal, + QIcon::On); + + const QIcon tabsCloseIcon = Utils::StyleHelper::getIconFromIconFont(fontName, {closeIconNormal, closeIconFocused}); + m_dockManager->iconProvider().registerCustomIcon(ADS::TabCloseIcon, tabsCloseIcon); m_dockManager->iconProvider().registerCustomIcon(ADS::DockAreaMenuIcon, menuIcon); m_dockManager->iconProvider().registerCustomIcon(ADS::DockAreaUndockIcon, undockIcon); |