1
0
mirror of https://github.com/KDE/latte-dock.git synced 2025-03-21 10:50:30 +03:00

fix #421,improve lockButton visibility states

This commit is contained in:
Michail Vourlakos 2017-05-01 11:01:02 +03:00
parent 840b21408a
commit 593070beb8

View File

@ -430,6 +430,10 @@ MouseArea {
&& currentApplet.applet.action("configure") && currentApplet.applet.action("configure").enabled;
closeButton.visible = currentApplet.applet.action("remove") && currentApplet.applet.action("remove").enabled
&& !(currentApplet.applet.pluginName===root.plasmoidName && dock && dock.docksWithTasks()===1 && dock.tasksPresent());
lockButton.visible = (currentApplet.applet.pluginName !== "org.kde.plasma.systemtray")
&& (currentApplet.applet.pluginName !== root.plasmoidName)
&& !currentApplet.isInternalViewSplitter
label.text = currentApplet.applet.title;
}
}
@ -475,13 +479,6 @@ MouseArea {
iconSource: checked ? "lock" : "unlock"
// tooltip: i18n("Lock/Unlock the parabolic effect for this applet")
visible: currentApplet &&
((currentApplet.applet &&
((currentApplet.applet.pluginName === "org.kde.plasma.systemtray")
|| (currentApplet.applet.pluginName === root.plasmoidName)) )
|| (currentApplet.isInternalViewSplitter))
? false : true
onCheckedChanged: {
currentApplet.lockZoom = checked;
root.layoutManager.saveLocks();