mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-29 15:03:09 +00:00
correctly update root.expandedApplet value
This commit is contained in:
parent
f8dbef7477
commit
27742df3ab
1 changed files with 6 additions and 2 deletions
|
|
@ -27,7 +27,7 @@ import org.kde.plasma.components 2.0 as PlasmaComponents
|
||||||
|
|
||||||
import org.kde.plasma.workspace.components 2.0 as PlasmaWorkspace
|
import org.kde.plasma.workspace.components 2.0 as PlasmaWorkspace
|
||||||
|
|
||||||
import "plasmapackage:/code/LayoutManager.js" as LayoutManager
|
import "LayoutManager.js" as LayoutManager
|
||||||
|
|
||||||
PlasmaCore.ColorScope {
|
PlasmaCore.ColorScope {
|
||||||
id: root
|
id: root
|
||||||
|
|
@ -48,7 +48,7 @@ PlasmaCore.ColorScope {
|
||||||
function addApplet(applet, x, y) {
|
function addApplet(applet, x, y) {
|
||||||
var container = appletContainerComponent.createObject(layout)
|
var container = appletContainerComponent.createObject(layout)
|
||||||
container.visible = true
|
container.visible = true
|
||||||
print("Applet added: " + applet)
|
print("Applet added: " + applet + " " + applet.title)
|
||||||
|
|
||||||
var appletWidth = applet.width;
|
var appletWidth = applet.width;
|
||||||
var appletHeight = applet.height;
|
var appletHeight = applet.height;
|
||||||
|
|
@ -124,6 +124,10 @@ PlasmaCore.ColorScope {
|
||||||
Connections {
|
Connections {
|
||||||
target: applet
|
target: applet
|
||||||
onExpandedChanged: {
|
onExpandedChanged: {
|
||||||
|
if (!applet.expanded && root.expandedApplet == applet) {
|
||||||
|
root.expandedApplet = null;
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (root.expandedApplet) {
|
if (root.expandedApplet) {
|
||||||
root.expandedApplet.expanded = false;
|
root.expandedApplet.expanded = false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue