Changeset View
Changeset View
Standalone View
Standalone View
applets/systemtray/package/contents/ui/main.qml
Show First 20 Lines • Show All 46 Lines • ▼ Show 20 Line(s) | 28 | MouseArea { | |||
---|---|---|---|---|---|
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 | property Component plasmoidItemComponent | ||
54 | 54 | | |||
55 | Plasmoid.onExpandedChanged: { | ||||
56 | if (!plasmoid.expanded) { | ||||
57 | dialog.visible = plasmoid.expanded; | ||||
58 | } | ||||
59 | } | ||||
60 | | ||||
55 | function updateItemVisibility(item) { | 61 | function updateItemVisibility(item) { | ||
56 | switch (item.effectiveStatus) { | 62 | switch (item.effectiveStatus) { | ||
57 | case PlasmaCore.Types.HiddenStatus: | 63 | case PlasmaCore.Types.HiddenStatus: | ||
58 | if (item.parent == invisibleEntriesContainer) { | 64 | if (item.parent == invisibleEntriesContainer) { | ||
59 | return; | 65 | return; | ||
60 | } | 66 | } | ||
61 | 67 | | |||
62 | item.parent = invisibleEntriesContainer; | 68 | item.parent = invisibleEntriesContainer; | ||
▲ Show 20 Lines • Show All 276 Lines • ▼ Show 20 Line(s) | 344 | onVisibleChanged: { | |||
339 | if (!visible) { | 345 | if (!visible) { | ||
340 | plasmoid.status = PlasmaCore.Types.PassiveStatus; | 346 | plasmoid.status = PlasmaCore.Types.PassiveStatus; | ||
341 | if (root.activeApplet) { | 347 | if (root.activeApplet) { | ||
342 | root.activeApplet.expanded = false; | 348 | root.activeApplet.expanded = false; | ||
343 | } | 349 | } | ||
344 | } else { | 350 | } else { | ||
345 | plasmoid.status = PlasmaCore.Types.RequiresAttentionStatus; | 351 | plasmoid.status = PlasmaCore.Types.RequiresAttentionStatus; | ||
346 | } | 352 | } | ||
353 | plasmoid.expanded = visible; | ||||
347 | } | 354 | } | ||
348 | mainItem: ExpandedRepresentation { | 355 | mainItem: ExpandedRepresentation { | ||
349 | id: expandedRepresentation | 356 | id: expandedRepresentation | ||
350 | 357 | | |||
351 | Keys.onEscapePressed: { | 358 | Keys.onEscapePressed: { | ||
352 | root.expanded = false; | 359 | root.expanded = false; | ||
353 | } | 360 | } | ||
354 | 361 | | |||
355 | activeApplet: root.activeApplet | 362 | activeApplet: root.activeApplet | ||
356 | 363 | | |||
357 | LayoutMirroring.enabled: Qt.application.layoutDirection === Qt.RightToLeft | 364 | LayoutMirroring.enabled: Qt.application.layoutDirection === Qt.RightToLeft | ||
358 | LayoutMirroring.childrenInherit: true | 365 | LayoutMirroring.childrenInherit: true | ||
359 | } | 366 | } | ||
360 | } | 367 | } | ||
361 | } | 368 | } |