Commit 06161b8c authored by David Edmundson's avatar David Edmundson

Make system tray pin persistent across sessions

parent 0ef9782b
......@@ -50,6 +50,10 @@
<label>Default icon size for the systray icons, it's an enum which values mean, Small, SmallMedium, Medium, Large, Huge, Enormous respectively. On low DPI systems they correspond to 16, 22, 32, 48, 64, 128 pixels. On high DPI systems those values would be scaled up, depending on the DPI.</label>
<default>1</default>
</entry>
<entry name="pin" type="Bool">
<label>Whether the popup should remain open when another window is activated</label>
<default>false</default>
</entry>
</group>
</kcfg>
......
......@@ -31,7 +31,6 @@ Item {
Layout.preferredWidth: Layout.minimumWidth
Layout.preferredHeight: Layout.minimumHeight * 1.5
property bool hideOnWindowDeactivate: !pinButton.checked
property alias activeApplet: container.activeApplet
property alias hiddenLayout: hiddenItemsView.layout
......@@ -41,6 +40,8 @@ Item {
width: Math.round(units.gridUnit * 1.25)
height: width
checkable: true
checked: plasmoid.configuration.pin
onCheckedChanged: plasmoid.configuration.pin = checked
iconSource: "window-pin"
z: 2
}
......
......@@ -339,7 +339,7 @@ MouseArea {
visualParent: root
flags: Qt.WindowStaysOnTopHint
location: plasmoid.location
hideOnWindowDeactivate: expandedRepresentation.hideOnWindowDeactivate
hideOnWindowDeactivate: !plasmoid.configuration.pin
onVisibleChanged: {
if (!visible) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment