diff --git a/src/linux/FloatingWidgetTitleBar.cpp b/src/linux/FloatingWidgetTitleBar.cpp index 7b81cac..e8e077b 100644 --- a/src/linux/FloatingWidgetTitleBar.cpp +++ b/src/linux/FloatingWidgetTitleBar.cpp @@ -45,7 +45,7 @@ namespace ads { using tTabLabel = CElidingLabel; -using tCloseButton = QPushButton; +using tCloseButton = QToolButton; /** * @brief Private data class of public interface CFloatingWidgetTitleBar @@ -81,7 +81,7 @@ void FloatingWidgetTitleBarPrivate::createLayout() CloseButton = new tCloseButton(); CloseButton->setObjectName("floatingTitleCloseButton"); - CloseButton->setFlat(true); + CloseButton->setAutoRaise(true); // The standard icons do does not look good on high DPI screens QIcon CloseIcon; @@ -190,8 +190,7 @@ void CFloatingWidgetTitleBar::setTitle(const QString &Text) //============================================================================ void CFloatingWidgetTitleBar::updateStyle() { - internal::repolishStyle(this); - internal::repolishStyle(d->TitleLabel); + internal::repolishStyle(this, internal::RepolishDirectChildren); } } // namespace ads diff --git a/src/stylesheets/default_linux.css b/src/stylesheets/default_linux.css index 3356eac..56b950e 100644 --- a/src/stylesheets/default_linux.css +++ b/src/stylesheets/default_linux.css @@ -75,6 +75,11 @@ QScrollArea#dockWidgetScrollArea { background: rgba(0, 0, 0, 32); } +#tabsMenuButton { + qproperty-icon: url(:/ads/images/tabs-menu-button.svg); + qproperty-iconSize: 16px; +} + #dockAreaCloseButton { qproperty-icon: url(:/ads/images/close-button.svg), url(:/ads/images/close-button-disabled.svg) disabled; @@ -85,4 +90,20 @@ QScrollArea#dockWidgetScrollArea { qproperty-icon: url(:/ads/images/detach-button.svg), url(:/ads/images/detach-button-disabled.svg) disabled; qproperty-iconSize: 16px; -} \ No newline at end of file +} + +#floatingTitleCloseButton { + qproperty-icon: url(:/ads/images/close-button.svg); + qproperty-iconSize: 16px; + border: none; + margin: 3px; +} + +#floatingTitleCloseButton:hover { + background: rgba(0, 0, 0, 24); + border: none; +} + +#floatingTitleCloseButton:pressed { + background: rgba(0, 0, 0, 48); +} diff --git a/src/stylesheets/focus_highlighting_linux.css b/src/stylesheets/focus_highlighting_linux.css index 73b5e63..3f1b393 100644 --- a/src/stylesheets/focus_highlighting_linux.css +++ b/src/stylesheets/focus_highlighting_linux.css @@ -88,6 +88,12 @@ QScrollArea#dockWidgetScrollArea { } +#tabsMenuButton { + qproperty-icon: url(:/ads/images/tabs-menu-button.svg); + qproperty-iconSize: 16px; +} + + /* Focus related styling */ ads--CDockWidgetTab[focused="true"] { background: palette(highlight); @@ -122,12 +128,43 @@ ads--CDockAreaWidget[focused="true"] ads--CDockAreaTitleBar { padding-bottom: 0px; } -ads--CFloatingDockContainer[isActiveWindow="true"] ads--CFloatingWidgetTitleBar - { + + +ads--CFloatingDockContainer[isActiveWindow="true"] ads--CFloatingWidgetTitleBar { background: palette(highlight); } -ads--CFloatingDockContainer[isActiveWindow="true"] ads--CFloatingWidgetTitleBar>QLabel - { +ads--CFloatingDockContainer[isActiveWindow="true"] #floatingTitleLabel { color: palette(light); -} \ No newline at end of file +} + +#floatingTitleCloseButton { + qproperty-icon: url(:/ads/images/close-button.svg); + qproperty-iconSize: 16px; + border: none; + margin: 3px; +} + +#floatingTitleCloseButton:hover { + background: rgba(0, 0, 0, 24); + border: none; +} + +#floatingTitleCloseButton:pressed { + background: rgba(0, 0, 0, 48); +} + + +ads--CFloatingDockContainer[isActiveWindow="true"] #floatingTitleCloseButton { + qproperty-icon: url(:/ads/images/close-button-focused.svg); + qproperty-iconSize: 16px; +} + +ads--CFloatingDockContainer[isActiveWindow="true"] #floatingTitleCloseButton:hover { + background: rgba(255, 255, 255, 48); +} + + +ads--CFloatingDockContainer[isActiveWindow="true"] #floatingTitleCloseButton:pressed { + background: rgba(255, 255, 255, 92); +}