summary refs log tree commit diff
path: root/resources/qml
diff options
context:
space:
mode:
authorJedi18 <targetakhil@gmail.com>2021-02-24 13:38:01 +0530
committerJedi18 <targetakhil@gmail.com>2021-02-24 13:38:01 +0530
commit096f37df1f81ca988a6a2aed7589ca5e15ee45d3 (patch)
treef4c6cc9a80417af28efa2aa28b5d951a6d825568 /resources/qml
parentfix matrixtextfield color and quickswitcher font size (diff)
downloadnheko-096f37df1f81ca988a6a2aed7589ca5e15ee45d3.tar.xz
fix row content centering
Diffstat (limited to 'resources/qml')
-rw-r--r--resources/qml/Completer.qml15
-rw-r--r--resources/qml/QuickSwitcher.qml1
2 files changed, 11 insertions, 5 deletions
diff --git a/resources/qml/Completer.qml b/resources/qml/Completer.qml
index 9fad7156..ee25bb3f 100644
--- a/resources/qml/Completer.qml
+++ b/resources/qml/Completer.qml
@@ -12,6 +12,7 @@ Popup {
     property var completer
     property bool bottomToTop: true
     property bool fullWidth: false
+    property bool centerRowContent: true
     property int avatarHeight: 24
     property int avatarWidth: 24
     property alias count: listView.count
@@ -119,7 +120,11 @@ Popup {
                 id: chooser
 
                 roleValue: popup.completerName
-                anchors.centerIn: parent
+                anchors.left: parent.left
+                anchors.top: parent.top
+                anchors.bottom: parent.bottom
+                anchors.right: centerRowContent ? parent : null
+                anchors.centerIn: centerRowContent ? parent : null
 
                 DelegateChoice {
                     roleValue: "user"
@@ -127,7 +132,7 @@ Popup {
                     RowLayout {
                         id: del
 
-                        anchors.centerIn: parent
+                        anchors.centerIn: centerRowContent ? parent : null
 
                         Avatar {
                             height: popup.avatarHeight
@@ -157,7 +162,7 @@ Popup {
                     RowLayout {
                         id: del
 
-                        anchors.centerIn: parent
+                        anchors.centerIn: centerRowContent ? parent : null
 
                         Label {
                             text: model.unicode
@@ -180,7 +185,7 @@ Popup {
                     RowLayout {
                         id: del
 
-                        anchors.centerIn: parent
+                        anchors.centerIn: centerRowContent ? parent : null
 
                         Avatar {
                             height: popup.avatarHeight
@@ -207,7 +212,7 @@ Popup {
                     RowLayout {
                         id: del
 
-                        anchors.centerIn: parent
+                        anchors.centerIn: centerRowContent ? parent : null
 
                         Avatar {
                             height: popup.avatarHeight
diff --git a/resources/qml/QuickSwitcher.qml b/resources/qml/QuickSwitcher.qml
index b772983a..eceffbde 100644
--- a/resources/qml/QuickSwitcher.qml
+++ b/resources/qml/QuickSwitcher.qml
@@ -55,6 +55,7 @@ Popup {
         fullWidth: true
         avatarHeight: textWidth
         avatarWidth: textWidth
+        centerRowContent: false
 
         closePolicy: Popup.NoAutoClose
     }