mirror of
https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System.git
synced 2024-12-25 15:41:34 +08:00
Updated linux stylesheet
Default linux style uses now the provided SVG buttons for the floating widget title bar close button
This commit is contained in:
parent
e2cebd9dcf
commit
3de877fe56
@ -45,7 +45,7 @@ namespace ads
|
|||||||
{
|
{
|
||||||
|
|
||||||
using tTabLabel = CElidingLabel;
|
using tTabLabel = CElidingLabel;
|
||||||
using tCloseButton = QPushButton;
|
using tCloseButton = QToolButton;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Private data class of public interface CFloatingWidgetTitleBar
|
* @brief Private data class of public interface CFloatingWidgetTitleBar
|
||||||
@ -81,7 +81,7 @@ void FloatingWidgetTitleBarPrivate::createLayout()
|
|||||||
|
|
||||||
CloseButton = new tCloseButton();
|
CloseButton = new tCloseButton();
|
||||||
CloseButton->setObjectName("floatingTitleCloseButton");
|
CloseButton->setObjectName("floatingTitleCloseButton");
|
||||||
CloseButton->setFlat(true);
|
CloseButton->setAutoRaise(true);
|
||||||
|
|
||||||
// The standard icons do does not look good on high DPI screens
|
// The standard icons do does not look good on high DPI screens
|
||||||
QIcon CloseIcon;
|
QIcon CloseIcon;
|
||||||
@ -190,8 +190,7 @@ void CFloatingWidgetTitleBar::setTitle(const QString &Text)
|
|||||||
//============================================================================
|
//============================================================================
|
||||||
void CFloatingWidgetTitleBar::updateStyle()
|
void CFloatingWidgetTitleBar::updateStyle()
|
||||||
{
|
{
|
||||||
internal::repolishStyle(this);
|
internal::repolishStyle(this, internal::RepolishDirectChildren);
|
||||||
internal::repolishStyle(d->TitleLabel);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace ads
|
} // namespace ads
|
||||||
|
@ -75,6 +75,11 @@ QScrollArea#dockWidgetScrollArea {
|
|||||||
background: rgba(0, 0, 0, 32);
|
background: rgba(0, 0, 0, 32);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#tabsMenuButton {
|
||||||
|
qproperty-icon: url(:/ads/images/tabs-menu-button.svg);
|
||||||
|
qproperty-iconSize: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
#dockAreaCloseButton {
|
#dockAreaCloseButton {
|
||||||
qproperty-icon: url(:/ads/images/close-button.svg),
|
qproperty-icon: url(:/ads/images/close-button.svg),
|
||||||
url(:/ads/images/close-button-disabled.svg) disabled;
|
url(:/ads/images/close-button-disabled.svg) disabled;
|
||||||
@ -85,4 +90,20 @@ QScrollArea#dockWidgetScrollArea {
|
|||||||
qproperty-icon: url(:/ads/images/detach-button.svg),
|
qproperty-icon: url(:/ads/images/detach-button.svg),
|
||||||
url(:/ads/images/detach-button-disabled.svg) disabled;
|
url(:/ads/images/detach-button-disabled.svg) disabled;
|
||||||
qproperty-iconSize: 16px;
|
qproperty-iconSize: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#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);
|
||||||
|
}
|
||||||
|
@ -88,6 +88,12 @@ QScrollArea#dockWidgetScrollArea {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#tabsMenuButton {
|
||||||
|
qproperty-icon: url(:/ads/images/tabs-menu-button.svg);
|
||||||
|
qproperty-iconSize: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Focus related styling */
|
/* Focus related styling */
|
||||||
ads--CDockWidgetTab[focused="true"] {
|
ads--CDockWidgetTab[focused="true"] {
|
||||||
background: palette(highlight);
|
background: palette(highlight);
|
||||||
@ -122,12 +128,43 @@ ads--CDockAreaWidget[focused="true"] ads--CDockAreaTitleBar {
|
|||||||
padding-bottom: 0px;
|
padding-bottom: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
ads--CFloatingDockContainer[isActiveWindow="true"] ads--CFloatingWidgetTitleBar
|
|
||||||
{
|
|
||||||
|
ads--CFloatingDockContainer[isActiveWindow="true"] ads--CFloatingWidgetTitleBar {
|
||||||
background: palette(highlight);
|
background: palette(highlight);
|
||||||
}
|
}
|
||||||
|
|
||||||
ads--CFloatingDockContainer[isActiveWindow="true"] ads--CFloatingWidgetTitleBar>QLabel
|
ads--CFloatingDockContainer[isActiveWindow="true"] #floatingTitleLabel {
|
||||||
{
|
|
||||||
color: palette(light);
|
color: palette(light);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#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);
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user