Changeset View
Changeset View
Standalone View
Standalone View
applets/appmenu/package/contents/ui/main.qml
Show First 20 Lines • Show All 98 Lines • ▼ Show 20 Line(s) | 57 | Plasmoid.fullRepresentation: GridLayout { | |||
---|---|---|---|---|---|
99 | PlasmaCore.DataSource { | 99 | PlasmaCore.DataSource { | ||
100 | id: keystateSource | 100 | id: keystateSource | ||
101 | engine: "keystate" | 101 | engine: "keystate" | ||
102 | connectedSources: ["Alt"] | 102 | connectedSources: ["Alt"] | ||
103 | } | 103 | } | ||
104 | 104 | | |||
105 | Repeater { | 105 | Repeater { | ||
106 | id: buttonRepeater | 106 | id: buttonRepeater | ||
107 | model: appMenuModel | 107 | model: !appMenuModel.menuHidden ? appMenuModel : null | ||
108 | 108 | | |||
109 | PlasmaComponents.ToolButton { | 109 | PlasmaComponents.ToolButton { | ||
110 | readonly property int buttonIndex: index | 110 | readonly property int buttonIndex: index | ||
111 | 111 | | |||
112 | Layout.preferredWidth: minimumWidth | 112 | Layout.preferredWidth: minimumWidth | ||
113 | Layout.fillWidth: root.vertical | 113 | Layout.fillWidth: root.vertical | ||
114 | Layout.fillHeight: !root.vertical | 114 | Layout.fillHeight: !root.vertical | ||
115 | text: { | 115 | text: { | ||
Show All 27 Lines | 141 | MouseArea { | |||
143 | onPressed: parent.clicked() | 143 | onPressed: parent.clicked() | ||
144 | } | 144 | } | ||
145 | } | 145 | } | ||
146 | } | 146 | } | ||
147 | } | 147 | } | ||
148 | 148 | | |||
149 | AppMenuPrivate.AppMenuModel { | 149 | AppMenuPrivate.AppMenuModel { | ||
150 | id: appMenuModel | 150 | id: appMenuModel | ||
151 | screenGeometry: plasmoid.screenGeometry | ||||
151 | onRequestActivateIndex: plasmoid.nativeInterface.requestActivateIndex(index) | 152 | onRequestActivateIndex: plasmoid.nativeInterface.requestActivateIndex(index) | ||
152 | Component.onCompleted: { | 153 | Component.onCompleted: { | ||
153 | plasmoid.nativeInterface.model = appMenuModel | 154 | plasmoid.nativeInterface.model = appMenuModel | ||
154 | } | 155 | } | ||
155 | } | 156 | } | ||
156 | } | 157 | } |