Changeset View
Changeset View
Standalone View
Standalone View
src/controls/private/ActionButton.qml
Show First 20 Lines • Show All 198 Lines • ▼ Show 20 Line(s) | 195 | onPressAndHold: { | |||
---|---|---|---|---|---|
199 | 199 | | |||
200 | //if an action has been assigned, show a message like a tooltip | 200 | //if an action has been assigned, show a message like a tooltip | ||
201 | if (actionUnderMouse && actionUnderMouse.text && Settings.tabletMode) { | 201 | if (actionUnderMouse && actionUnderMouse.text && Settings.tabletMode) { | ||
202 | Controls.ToolTip.show(actionUnderMouse.text, 3000) | 202 | Controls.ToolTip.show(actionUnderMouse.text, 3000) | ||
203 | } | 203 | } | ||
204 | } | 204 | } | ||
205 | Connections { | 205 | Connections { | ||
206 | target: root.hasGlobalDrawer ? globalDrawer : null | 206 | target: root.hasGlobalDrawer ? globalDrawer : null | ||
207 | onPositionChanged: { | 207 | function onPositionChanged() { | ||
208 | if ( globalDrawer && globalDrawer.modal && !mouseArea.pressed && !edgeMouseArea.pressed && !fakeContextMenuButton.pressed) { | 208 | if ( globalDrawer && globalDrawer.modal && !mouseArea.pressed && !edgeMouseArea.pressed && !fakeContextMenuButton.pressed) { | ||
209 | button.x = globalDrawer.contentItem.width * globalDrawer.position + root.width/2 - button.width/2; | 209 | button.x = globalDrawer.contentItem.width * globalDrawer.position + root.width/2 - button.width/2; | ||
210 | } | 210 | } | ||
211 | } | 211 | } | ||
212 | } | 212 | } | ||
213 | Connections { | 213 | Connections { | ||
214 | target: root.hasContextDrawer ? contextDrawer : null | 214 | target: root.hasContextDrawer ? contextDrawer : null | ||
215 | onPositionChanged: { | 215 | function onPositionChanged() { | ||
216 | if (contextDrawer && contextDrawer.modal && !mouseArea.pressed && !edgeMouseArea.pressed && !fakeContextMenuButton.pressed) { | 216 | if (contextDrawer && contextDrawer.modal && !mouseArea.pressed && !edgeMouseArea.pressed && !fakeContextMenuButton.pressed) { | ||
217 | button.x = root.width/2 - button.width/2 - contextDrawer.contentItem.width * contextDrawer.position; | 217 | button.x = root.width/2 - button.width/2 - contextDrawer.contentItem.width * contextDrawer.position; | ||
218 | } | 218 | } | ||
219 | } | 219 | } | ||
220 | } | 220 | } | ||
221 | 221 | | |||
222 | Item { | 222 | Item { | ||
223 | id: background | 223 | id: background | ||
▲ Show 20 Lines • Show All 266 Lines • Show Last 20 Lines |