Changeset View
Changeset View
Standalone View
Standalone View
qmlUiKirigami/ImageViewer.qml
Show First 20 Lines • Show All 85 Lines • ▼ Show 20 Line(s) | 78 | contextualActions: [ | |||
---|---|---|---|---|---|
86 | }, | 86 | }, | ||
87 | Kirigami.Action { | 87 | Kirigami.Action { | ||
88 | iconName: "image-rotate-right-symbolic" | 88 | iconName: "image-rotate-right-symbolic" | ||
89 | text: i18n("Rotate right") | 89 | text: i18n("Rotate right") | ||
90 | tooltip: i18n("Rotate the image to the right") | 90 | tooltip: i18n("Rotate the image to the right") | ||
91 | onTriggered: { | 91 | onTriggered: { | ||
92 | imageDoc.rotate(90) | 92 | imageDoc.rotate(90) | ||
93 | } | 93 | } | ||
94 | }, | ||||
95 | Kirigami.Action { | ||||
96 | iconName: "image-flip-horizontal-symbolic" | ||||
97 | text: i18n("Mirror") | ||||
98 | tooltip: i18n("Flips the image horizontally") | ||||
99 | onTriggered: { | ||||
100 | imageDoc.scale( -1, 1) | ||||
101 | } | ||||
102 | }, | ||||
103 | Kirigami.Action { | ||||
104 | iconName: "image-flip-vertical-symbolic" | ||||
105 | text: i18n("Flip") | ||||
106 | tooltip: i18n("Flips the image vertically") | ||||
107 | onTriggered: { | ||||
108 | imageDoc.scale( 1, -1) | ||||
109 | } | ||||
94 | } | 110 | } | ||
95 | ] | 111 | ] | ||
96 | } | 112 | } | ||
97 | 113 | | |||
98 | //FIXME: HACK | 114 | //FIXME: HACK | ||
99 | property bool wasDrawerOpen | 115 | property bool wasDrawerOpen | ||
100 | Component.onCompleted: { | 116 | Component.onCompleted: { | ||
101 | applicationWindow().controlsVisible = false; | 117 | applicationWindow().controlsVisible = false; | ||
▲ Show 20 Lines • Show All 153 Lines • ▼ Show 20 Line(s) | 265 | KQA.QImageItem { | |||
255 | Timer { | 271 | Timer { | ||
256 | id: doubleClickTimer | 272 | id: doubleClickTimer | ||
257 | interval: 150 | 273 | interval: 150 | ||
258 | onTriggered: applicationWindow().controlsVisible = !applicationWindow().controlsVisible | 274 | onTriggered: applicationWindow().controlsVisible = !applicationWindow().controlsVisible | ||
259 | } | 275 | } | ||
260 | MouseArea { | 276 | MouseArea { | ||
261 | anchors.fill: parent | 277 | anchors.fill: parent | ||
262 | onClicked: { | 278 | onClicked: { | ||
279 | contextDrawer.drawerOpen = false | ||||
263 | doubleClickTimer.restart(); | 280 | doubleClickTimer.restart(); | ||
264 | } | 281 | } | ||
265 | onDoubleClicked: { | 282 | onDoubleClicked: { | ||
266 | doubleClickTimer.running = false; | 283 | doubleClickTimer.running = false; | ||
267 | applicationWindow().controlsVisible = false; | 284 | applicationWindow().controlsVisible = false; | ||
268 | if (flick.interactive) { | 285 | if (flick.interactive) { | ||
269 | zoomAnim.x = 0; | 286 | zoomAnim.x = 0; | ||
270 | zoomAnim.y = 0; | 287 | zoomAnim.y = 0; | ||
▲ Show 20 Lines • Show All 59 Lines • Show Last 20 Lines |