Changeset View
Changeset View
Standalone View
Standalone View
applets/systemtray/package/contents/ui/main.qml
Show First 20 Lines • Show All 44 Lines • ▼ Show 20 Line(s) | 28 | MouseArea { | |||
---|---|---|---|---|---|
45 | property Item activeApplet | 45 | property Item activeApplet | ||
46 | property int status: dialog.visible ? PlasmaCore.Types.RequiresAttentionStatus : PlasmaCore.Types.PassiveStatus | 46 | property int status: dialog.visible ? PlasmaCore.Types.RequiresAttentionStatus : PlasmaCore.Types.PassiveStatus | ||
47 | 47 | | |||
48 | property alias visibleLayout: tasksRow | 48 | property alias visibleLayout: tasksRow | ||
49 | property alias hiddenLayout: expandedRepresentation.hiddenLayout | 49 | property alias hiddenLayout: expandedRepresentation.hiddenLayout | ||
50 | 50 | | |||
51 | property alias statusNotifierModel: statusNotifierModel | 51 | property alias statusNotifierModel: statusNotifierModel | ||
52 | 52 | | |||
53 | property Component plasmoidItemComponent | 53 | // workaround https://bugreports.qt.io/browse/QTBUG-71238 / https://bugreports.qt.io/browse/QTBUG-72004 | ||
54 | property Component plasmoidItemComponent: Qt.createComponent("items/PlasmoidItem.qml") | ||||
54 | 55 | | |||
55 | Plasmoid.onExpandedChanged: { | 56 | Plasmoid.onExpandedChanged: { | ||
56 | if (!plasmoid.expanded) { | 57 | if (!plasmoid.expanded) { | ||
57 | dialog.visible = plasmoid.expanded; | 58 | dialog.visible = plasmoid.expanded; | ||
58 | } | 59 | } | ||
59 | } | 60 | } | ||
60 | 61 | | |||
61 | function updateItemVisibility(item) { | 62 | function updateItemVisibility(item) { | ||
Show All 35 Lines | |||||
97 | } | 98 | } | ||
98 | 99 | | |||
99 | onWheel: { | 100 | onWheel: { | ||
100 | // Don't propagate unhandled wheel events | 101 | // Don't propagate unhandled wheel events | ||
101 | wheel.accepted = true; | 102 | wheel.accepted = true; | ||
102 | } | 103 | } | ||
103 | 104 | | |||
104 | Containment.onAppletAdded: { | 105 | Containment.onAppletAdded: { | ||
105 | if (!plasmoidItemComponent) { | | |||
106 | plasmoidItemComponent = Qt.createComponent("items/PlasmoidItem.qml"); | | |||
107 | } | | |||
108 | //Allow the plasmoid expander to know in what window it will be | 106 | //Allow the plasmoid expander to know in what window it will be | ||
109 | var plasmoidContainer = plasmoidItemComponent.createObject(invisibleEntriesContainer, {"x": x, "y": y, "applet": applet}); | 107 | var plasmoidContainer = plasmoidItemComponent.createObject(invisibleEntriesContainer, {"x": x, "y": y, "applet": applet}); | ||
110 | 108 | | |||
111 | applet.parent = plasmoidContainer | 109 | applet.parent = plasmoidContainer | ||
112 | applet.anchors.left = plasmoidContainer.left | 110 | applet.anchors.left = plasmoidContainer.left | ||
113 | applet.anchors.top = plasmoidContainer.top | 111 | applet.anchors.top = plasmoidContainer.top | ||
114 | applet.anchors.bottom = plasmoidContainer.bottom | 112 | applet.anchors.bottom = plasmoidContainer.bottom | ||
115 | applet.width = plasmoidContainer.height | 113 | applet.width = plasmoidContainer.height | ||
▲ Show 20 Lines • Show All 273 Lines • Show Last 20 Lines |