summary refs log tree commit diff
path: root/resources/qml/QuickSwitcher.qml
diff options
context:
space:
mode:
Diffstat (limited to 'resources/qml/QuickSwitcher.qml')
-rw-r--r--resources/qml/QuickSwitcher.qml38
1 files changed, 38 insertions, 0 deletions
diff --git a/resources/qml/QuickSwitcher.qml b/resources/qml/QuickSwitcher.qml
new file mode 100644
index 00000000..317c96b3
--- /dev/null
+++ b/resources/qml/QuickSwitcher.qml
@@ -0,0 +1,38 @@
+import QtQuick 2.9
+import QtQuick.Controls 2.3
+import im.nheko 1.0
+
+Popup {
+    x: parent.width / 2 - width / 2
+    y: parent.height / 4 - height / 2
+    width: parent.width / 2
+    height: 100
+    modal: true
+    focus: true
+    closePolicy: Popup.CloseOnEscape | Popup.CloseOnPressOutside
+    parent: Overlay.overlay
+
+    TextInput {
+        id: roomTextInput
+
+        anchors.fill: parent
+        focus: true
+
+        onTextEdited: {
+            completerPopup.completer.setSearchString(text)
+        }
+    }
+
+    Completer {
+        id: completerPopup
+
+        x: roomTextInput.x + 100
+        y: roomTextInput.y - 20
+        completerName: "room"
+        bottomToTop: true
+    }
+
+    onOpened: {
+        completerPopup.open()
+    }
+}
\ No newline at end of file