Changeset View
Changeset View
Standalone View
Standalone View
applets/systemtray/package/contents/ui/items/PlasmoidItem.qml
Show All 22 Lines | |||||
23 | AbstractItem { | 23 | AbstractItem { | ||
24 | id: plasmoidContainer | 24 | id: plasmoidContainer | ||
25 | 25 | | |||
26 | property Item applet | 26 | property Item applet | ||
27 | iconItem: applet | 27 | iconItem: applet | ||
28 | text: applet ? applet.title : "" | 28 | text: applet ? applet.title : "" | ||
29 | 29 | | |||
30 | itemId: applet ? applet.pluginName : "" | 30 | itemId: applet ? applet.pluginName : "" | ||
31 | category: applet ? plasmoid.nativeInterface.plasmoidCategory(applet) : "UnknownCategory" | | |||
32 | mainText: applet ? applet.toolTipMainText : "" | 31 | mainText: applet ? applet.toolTipMainText : "" | ||
33 | subText: applet ? applet.toolTipSubText : "" | 32 | subText: applet ? applet.toolTipSubText : "" | ||
34 | icon: applet ? applet.icon : "" | 33 | icon: applet ? applet.icon : "" | ||
35 | mainItem: applet && applet.toolTipItem ? applet.toolTipItem : null | 34 | mainItem: applet && applet.toolTipItem ? applet.toolTipItem : null | ||
36 | textFormat: applet ? applet.toolTipTextFormat : "" | 35 | textFormat: applet ? applet.toolTipTextFormat : "" | ||
37 | status: applet ? applet.status : PlasmaCore.Types.UnknownStatus | 36 | status: applet ? applet.status : PlasmaCore.Types.UnknownStatus | ||
38 | active: root.activeApplet !== applet | 37 | active: root.activeApplet !== applet | ||
39 | 38 | | |||
Show All 35 Lines | 71 | if (applet) { | |||
75 | applet.anchors.top = plasmoidContainer.top | 74 | applet.anchors.top = plasmoidContainer.top | ||
76 | applet.anchors.bottom = plasmoidContainer.bottom | 75 | applet.anchors.bottom = plasmoidContainer.bottom | ||
77 | applet.width = plasmoidContainer.height | 76 | applet.width = plasmoidContainer.height | ||
78 | applet.visible = true | 77 | applet.visible = true | ||
79 | plasmoidContainer.visible = true | 78 | plasmoidContainer.visible = true | ||
80 | 79 | | |||
81 | preloadFullRepresentationItem(applet.fullRepresentationItem) | 80 | preloadFullRepresentationItem(applet.fullRepresentationItem) | ||
82 | } | 81 | } | ||
83 | if (!applet) { | | |||
84 | plasmoidContainer.destroy(); | | |||
85 | } | | |||
86 | } | 82 | } | ||
87 | 83 | | |||
88 | Connections { | 84 | Connections { | ||
89 | target: applet | 85 | target: applet | ||
90 | onActivated: plasmoidContainer.activated() | 86 | onActivated: plasmoidContainer.activated() | ||
91 | 87 | | |||
92 | onExpandedChanged: { | 88 | onExpandedChanged: { | ||
93 | if (expanded) { | 89 | if (expanded) { | ||
Show All 22 Lines |