mirror of
https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System.git
synced 2024-11-15 13:15:43 +08:00
add pin icon
This commit is contained in:
parent
e4565034fb
commit
1a903e74f2
@ -167,12 +167,12 @@ void DockAreaTitleBarPrivate::createButtons()
|
||||
// AutoHide Button
|
||||
const auto autoHideEnabled = testConfigFlag(CDockManager::DockContainerHasRightSideBar) || testConfigFlag(CDockManager::DockContainerHasLeftSideBar);
|
||||
AutoHideButton = new CTitleBarButton(testConfigFlag(CDockManager::DockAreaHasAutoHideButton) && autoHideEnabled);
|
||||
AutoHideButton->setObjectName("autoHideButton");
|
||||
AutoHideButton->setObjectName("dockAreaAutoHideButton");
|
||||
AutoHideButton->setAutoRaise(true);
|
||||
AutoHideButton->setCheckable(true);
|
||||
AutoHideButton->setChecked(false);
|
||||
internal::setToolTip(AutoHideButton, QObject::tr("Toggle Auto Hide Group"));
|
||||
internal::setButtonIcon(AutoHideButton, QStyle::SP_DialogOkButton, ads::DockAreaUndockIcon);
|
||||
internal::setButtonIcon(AutoHideButton, QStyle::SP_DialogOkButton, ads::AutoHideIcon);
|
||||
AutoHideButton->setSizePolicy(ButtonSizePolicy);
|
||||
Layout->addWidget(AutoHideButton, 0);
|
||||
_this->connect(AutoHideButton, SIGNAL(toggled(bool)), SLOT(onAutoHideButtonClicked(bool)));
|
||||
|
@ -2,6 +2,7 @@
|
||||
<qresource prefix="/ads">
|
||||
<file>stylesheets/default.css</file>
|
||||
<file>images/close-button.svg</file>
|
||||
<file>images/pin-button.svg</file>
|
||||
<file>images/close-button-disabled.svg</file>
|
||||
<file>stylesheets/default_linux.css</file>
|
||||
<file>images/close-button-focused.svg</file>
|
||||
|
53
src/images/pin-button.svg
Normal file
53
src/images/pin-button.svg
Normal file
@ -0,0 +1,53 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
version="1.1"
|
||||
id="Layer_1"
|
||||
x="0px"
|
||||
y="0px"
|
||||
width="16"
|
||||
height="16"
|
||||
viewBox="0 0 16 16"
|
||||
enable-background="new 0 0 122.879 122.867"
|
||||
xml:space="preserve"
|
||||
sodipodi:docname="pin-button-inkscape.svg"
|
||||
inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)"><metadata
|
||||
id="metadata53"><rdf:RDF><cc:Work
|
||||
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
|
||||
id="defs51" /><sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1017"
|
||||
id="namedview49"
|
||||
showgrid="false"
|
||||
fit-margin-top="0"
|
||||
fit-margin-left="0"
|
||||
fit-margin-right="0"
|
||||
fit-margin-bottom="0"
|
||||
inkscape:zoom="19.037734"
|
||||
inkscape:cx="4.5643376"
|
||||
inkscape:cy="2.7353223"
|
||||
inkscape:window-x="1912"
|
||||
inkscape:window-y="-8"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="Layer_1" /><g
|
||||
id="g46"
|
||||
transform="matrix(0.08138071,0,0,0.08138898,3.0000001,2.99998)"><path
|
||||
fill-rule="evenodd"
|
||||
clip-rule="evenodd"
|
||||
d="M 83.88,0.451 122.427,39 c 0.603,0.601 0.603,1.585 0,2.188 l -13.128,13.125 c -0.602,0.604 -1.586,0.604 -2.187,0 l -3.732,-3.73 -17.303,17.3 c 3.882,14.621 0.095,30.857 -11.37,42.32 -0.266,0.268 -0.535,0.529 -0.808,0.787 -1.004,0.955 -0.843,0.949 -1.813,-0.021 L 47.597,86.48 0,122.867 36.399,75.283 11.874,50.76 C 10.896,49.78 10.978,49.934 11.94,48.923 12.18,48.672 12.425,48.42 12.674,48.17 24.137,36.707 40.376,32.917 54.996,36.8 L 72.297,19.5 68.564,15.768 c -0.601,-0.601 -0.601,-1.585 0,-2.188 L 81.691,0.451 c 0.604,-0.601 1.588,-0.601 2.189,0 z"
|
||||
id="path44" /></g></svg>
|
After Width: | Height: | Size: 2.3 KiB |
@ -55,6 +55,11 @@ QScrollArea#dockWidgetScrollArea {
|
||||
border: none;
|
||||
}
|
||||
|
||||
#dockAreaAutoHideButton {
|
||||
qproperty-icon: url(:/ads/images/pin-button.svg);
|
||||
qproperty-iconSize: 16px;
|
||||
}
|
||||
|
||||
#tabCloseButton {
|
||||
margin-top: 2px;
|
||||
background: none;
|
||||
|
@ -59,6 +59,11 @@ QScrollArea#dockWidgetScrollArea {
|
||||
border: none;
|
||||
}
|
||||
|
||||
#dockAreaAutoHideButton {
|
||||
qproperty-icon: url(:/ads/images/pin-button.svg);
|
||||
qproperty-iconSize: 16px;
|
||||
}
|
||||
|
||||
#tabCloseButton {
|
||||
margin-top: 2px;
|
||||
background: none;
|
||||
|
@ -83,6 +83,11 @@ QScrollArea#dockWidgetScrollArea {
|
||||
background: rgba(0, 0, 0, 48);
|
||||
}
|
||||
|
||||
#dockAreaAutoHideButton {
|
||||
qproperty-icon: url(:/ads/images/pin-button.svg);
|
||||
qproperty-iconSize: 16px;
|
||||
}
|
||||
|
||||
#dockAreaCloseButton {
|
||||
qproperty-icon: url(:/ads/images/close-button.svg),
|
||||
url(:/ads/images/close-button-disabled.svg) disabled;
|
||||
|
@ -72,6 +72,11 @@ QScrollArea#dockWidgetScrollArea {
|
||||
qproperty-iconSize: 16px;
|
||||
}
|
||||
|
||||
#dockAreaAutoHideButton {
|
||||
qproperty-icon: url(:/ads/images/pin-button.svg);
|
||||
qproperty-iconSize: 16px;
|
||||
}
|
||||
|
||||
#tabCloseButton {
|
||||
margin-top: 2px;
|
||||
background: none;
|
||||
|
Loading…
Reference in New Issue
Block a user