summary refs log tree commit diff
path: root/resources/qml/Root.qml
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2022-01-02 21:46:29 +0100
committerNicolas Werner <nicolas.werner@hotmail.de>2022-01-02 21:46:29 +0100
commit66520eae195ad252021ebb5c6bfe2a1efc5f8adf (patch)
treeb747d2ca17a3fc4a7bc116cd309d52861e2b3c0b /resources/qml/Root.qml
parentFix fade out of ripple (diff)
downloadnheko-66520eae195ad252021ebb5c6bfe2a1efc5f8adf.tar.xz
Port image overlay to qml
Allows you to zoom and pan now.

relates to #647
Diffstat (limited to 'resources/qml/Root.qml')
-rw-r--r--resources/qml/Root.qml17
1 files changed, 17 insertions, 0 deletions
diff --git a/resources/qml/Root.qml b/resources/qml/Root.qml
index 85ae783d..c85b641a 100644
--- a/resources/qml/Root.qml
+++ b/resources/qml/Root.qml
@@ -136,6 +136,14 @@ Page {
 
     }
 
+    Component {
+        id: imageOverlay
+
+        ImageOverlay {
+        }
+
+    }
+
     Shortcut {
         sequence: "Ctrl+K"
         onActivated: {
@@ -234,6 +242,15 @@ Page {
             dialog.open();
         }
 
+        function onShowImageOverlay(room, eventId, url, proportionalHeight, originalWidth) {
+            var dialog = imageOverlay.createObject(timelineRoot, {
+                "room": room,
+                "eventId": eventId,
+                "url": url
+            });
+            dialog.showFullScreen();
+        }
+
         target: TimelineManager
     }