Changeset View
Changeset View
Standalone View
Standalone View
applets/systemtray/container/package/contents/ui/main.qml
Show All 33 Lines | 25 | Item { | |||
---|---|---|---|---|---|
34 | 34 | | |||
35 | Plasmoid.onExpandedChanged: { | 35 | Plasmoid.onExpandedChanged: { | ||
36 | if (internalSystray && !plasmoid.expanded) { | 36 | if (internalSystray && !plasmoid.expanded) { | ||
37 | internalSystray.expanded = false; | 37 | internalSystray.expanded = false; | ||
38 | } | 38 | } | ||
39 | } | 39 | } | ||
40 | Connections { | 40 | Connections { | ||
41 | target: internalSystray | 41 | target: internalSystray | ||
42 | onExpandedChanged: plasmoid.expanded = internalSystray.expanded | 42 | function onExpandedChanged() { plasmoid.expanded = internalSystray.expanded } | ||
43 | } | 43 | } | ||
44 | 44 | | |||
45 | property Item internalSystray | 45 | property Item internalSystray | ||
46 | 46 | | |||
47 | Component.onCompleted: { | 47 | Component.onCompleted: { | ||
48 | root.internalSystray = plasmoid.nativeInterface.internalSystray; | 48 | root.internalSystray = plasmoid.nativeInterface.internalSystray; | ||
49 | 49 | | |||
50 | if (root.internalSystray == null) { | 50 | if (root.internalSystray == null) { | ||
51 | return; | 51 | return; | ||
52 | } | 52 | } | ||
53 | root.internalSystray.parent = root; | 53 | root.internalSystray.parent = root; | ||
54 | root.internalSystray.anchors.fill = root; | 54 | root.internalSystray.anchors.fill = root; | ||
55 | } | 55 | } | ||
56 | 56 | | |||
57 | Connections { | 57 | Connections { | ||
58 | target: plasmoid.nativeInterface | 58 | target: plasmoid.nativeInterface | ||
59 | onInternalSystrayChanged: { | 59 | function onInternalSystrayChanged() { | ||
60 | root.internalSystray = plasmoid.nativeInterface.internalSystray; | 60 | root.internalSystray = plasmoid.nativeInterface.internalSystray; | ||
61 | root.internalSystray.parent = root; | 61 | root.internalSystray.parent = root; | ||
62 | root.internalSystray.anchors.fill = root; | 62 | root.internalSystray.anchors.fill = root; | ||
63 | } | 63 | } | ||
64 | } | 64 | } | ||
65 | } | 65 | } |