summary refs log tree commit diff
path: root/resources/qml/dialogs
diff options
context:
space:
mode:
Diffstat (limited to 'resources/qml/dialogs')
-rw-r--r--resources/qml/dialogs/AliasEditor.qml1
-rw-r--r--resources/qml/dialogs/AllowedRoomsSettingsDialog.qml12
-rw-r--r--resources/qml/dialogs/ConfirmJoinRoomDialog.qml5
-rw-r--r--resources/qml/dialogs/CreateDirect.qml11
-rw-r--r--resources/qml/dialogs/ImagePackEditorDialog.qml8
-rw-r--r--resources/qml/dialogs/ImagePackSettingsDialog.qml8
-rw-r--r--resources/qml/dialogs/InviteDialog.qml10
-rw-r--r--resources/qml/dialogs/LeaveRoomDialog.qml6
-rw-r--r--resources/qml/dialogs/LogoutDialog.qml5
-rw-r--r--resources/qml/dialogs/PowerLevelEditor.qml2
-rw-r--r--resources/qml/dialogs/PowerLevelSpacesApplyDialog.qml12
-rw-r--r--resources/qml/dialogs/ReadReceipts.qml4
-rw-r--r--resources/qml/dialogs/RoomDirectory.qml8
-rw-r--r--resources/qml/dialogs/RoomMembers.qml9
-rw-r--r--resources/qml/dialogs/RoomSettingsDialog.qml4
-rw-r--r--resources/qml/dialogs/UserProfile.qml9
16 files changed, 52 insertions, 62 deletions
diff --git a/resources/qml/dialogs/AliasEditor.qml b/resources/qml/dialogs/AliasEditor.qml
index df2938ef..82f12750 100644
--- a/resources/qml/dialogs/AliasEditor.qml
+++ b/resources/qml/dialogs/AliasEditor.qml
@@ -3,7 +3,6 @@
 // SPDX-License-Identifier: GPL-3.0-or-later
 
 import ".."
-import "../components"
 import QtQuick
 import QtQuick.Controls
 import QtQuick.Layouts
diff --git a/resources/qml/dialogs/AllowedRoomsSettingsDialog.qml b/resources/qml/dialogs/AllowedRoomsSettingsDialog.qml
index 89ea5e04..82b5506e 100644
--- a/resources/qml/dialogs/AllowedRoomsSettingsDialog.qml
+++ b/resources/qml/dialogs/AllowedRoomsSettingsDialog.qml
@@ -3,13 +3,11 @@
 // SPDX-License-Identifier: GPL-3.0-or-later
 
 import ".."
-import "../ui"
-import Qt.labs.platform 1.1 as Platform
-import QtQuick 2.15
-import QtQuick.Controls 2.3
-import QtQuick.Layouts 1.2
-import QtQuick.Window 2.13
-import im.nheko 1.0
+import QtQuick
+import QtQuick.Controls
+import QtQuick.Layouts
+import QtQuick.Window
+import im.nheko
 
 ApplicationWindow {
     id: allowedDialog
diff --git a/resources/qml/dialogs/ConfirmJoinRoomDialog.qml b/resources/qml/dialogs/ConfirmJoinRoomDialog.qml
index a3fb9831..eb33cfc3 100644
--- a/resources/qml/dialogs/ConfirmJoinRoomDialog.qml
+++ b/resources/qml/dialogs/ConfirmJoinRoomDialog.qml
@@ -4,7 +4,6 @@
 
 import ".."
 import "../ui"
-import Qt.labs.platform 1.1 as Platform
 import QtQuick 2.15
 import QtQuick.Controls 2.3
 import QtQuick.Layouts 1.2
@@ -39,8 +38,8 @@ ApplicationWindow {
             url: summary.roomAvatarUrl.replace("mxc://", "image://MxcImage/")
             roomid: summary.roomid
             displayName: summary.roomName
-            height: 130
-            width: 130
+            Layout.preferredHeight: 130
+            Layout.preferredWidth: 130
             Layout.alignment: Qt.AlignHCenter
         }
 
diff --git a/resources/qml/dialogs/CreateDirect.qml b/resources/qml/dialogs/CreateDirect.qml
index 75013970..d411c5f2 100644
--- a/resources/qml/dialogs/CreateDirect.qml
+++ b/resources/qml/dialogs/CreateDirect.qml
@@ -3,12 +3,11 @@
 // SPDX-License-Identifier: GPL-3.0-or-later
 
 import ".."
-import QtQuick 2.15
-import QtQuick.Window 2.13
-import QtQuick.Layouts 1.3
-import QtQuick.Controls 2.3
-import QtQml.Models 2.15
-import im.nheko 1.0
+import QtQuick
+import QtQuick.Window
+import QtQuick.Layouts
+import QtQuick.Controls
+import im.nheko
 
 ApplicationWindow {
     id: createDirectRoot
diff --git a/resources/qml/dialogs/ImagePackEditorDialog.qml b/resources/qml/dialogs/ImagePackEditorDialog.qml
index 4cb2c1f6..9416ec97 100644
--- a/resources/qml/dialogs/ImagePackEditorDialog.qml
+++ b/resources/qml/dialogs/ImagePackEditorDialog.qml
@@ -137,8 +137,8 @@ ApplicationWindow {
                         url: imagePack.avatarUrl.replace("mxc://", "image://MxcImage/")
                         displayName: imagePack.packname
                         roomid: imagePack.statekey
-                        height: 130
-                        width: 130
+                        Layout.preferredHeight: 130
+                        Layout.preferredWidth: 130
                         crop: false
                         Layout.alignment: Qt.AlignHCenter
 
@@ -238,8 +238,8 @@ ApplicationWindow {
                         url: imagePack.data(imagePack.index(currentImageIndex, 0), SingleImagePackModel.Url).replace("mxc://", "image://MxcImage/") + "?scale"
                         displayName: imagePack.data(imagePack.index(currentImageIndex, 0), SingleImagePackModel.ShortCode)
                         roomid: displayName
-                        height: 130
-                        width: 130
+                        Layout.preferredHeight: 130
+                        Layout.preferredWidth: 130
                         crop: false
                         Layout.alignment: Qt.AlignHCenter
                     }
diff --git a/resources/qml/dialogs/ImagePackSettingsDialog.qml b/resources/qml/dialogs/ImagePackSettingsDialog.qml
index b7aab2a6..9f807e65 100644
--- a/resources/qml/dialogs/ImagePackSettingsDialog.qml
+++ b/resources/qml/dialogs/ImagePackSettingsDialog.qml
@@ -66,7 +66,7 @@ ApplicationWindow {
                             dialog.show();
                             timelineRoot.destroyOnClose(dialog);
                         }
-                        width: packlistC.width
+                        Layout.preferredWidth: packlistC.width
                         visible: !packlist.containsAccountPack
                         text: qsTr("Create account pack")
                     }
@@ -79,7 +79,7 @@ ApplicationWindow {
                             dialog.show();
                             timelineRoot.destroyOnClose(dialog);
                         }
-                        width: packlistC.width
+                        Layout.preferredWidth: packlistC.width
                         visible: room.permissions.canChange(MtxEvent.ImagePackInRoom)
                         text: qsTr("New room pack")
                     }
@@ -146,8 +146,8 @@ ApplicationWindow {
                         url: packinfo.avatarUrl.replace("mxc://", "image://MxcImage/")
                         displayName: packinfo.packName
                         roomid: packinfo.statekey
-                        height: 100
-                        width: 100
+                        Layout.preferredHeight: 100
+                        Layout.preferredWidth: 100
                         Layout.alignment: Qt.AlignHCenter
                         enabled: false
                     }
diff --git a/resources/qml/dialogs/InviteDialog.qml b/resources/qml/dialogs/InviteDialog.qml
index ce17bd0f..9fc165c7 100644
--- a/resources/qml/dialogs/InviteDialog.qml
+++ b/resources/qml/dialogs/InviteDialog.qml
@@ -4,10 +4,10 @@
 
 import ".."
 import "../components"
-import QtQuick 2.12
-import QtQuick.Controls 2.12
-import QtQuick.Layouts 1.12
-import im.nheko 1.0
+import QtQuick
+import QtQuick.Controls
+import QtQuick.Layouts
+import im.nheko
 
 ApplicationWindow {
     id: inviteDialogRoot
@@ -180,7 +180,7 @@ ApplicationWindow {
             Rectangle {
                 Layout.fillHeight: true
                 visible: inviteesList.visible
-                width: 1
+                Layout.preferredWidth: 1
                 color: Nheko.theme.separator
             }
             ListView {
diff --git a/resources/qml/dialogs/LeaveRoomDialog.qml b/resources/qml/dialogs/LeaveRoomDialog.qml
index 3e78fb3b..c70a4ac0 100644
--- a/resources/qml/dialogs/LeaveRoomDialog.qml
+++ b/resources/qml/dialogs/LeaveRoomDialog.qml
@@ -3,10 +3,8 @@
 // SPDX-License-Identifier: GPL-3.0-or-later
 
 import Qt.labs.platform 1.1 as P
-import QtQuick 2.15
-import QtQuick.Controls 2.15
-import im.nheko 1.0
-import "../voip"
+import QtQuick
+import im.nheko
 
 P.MessageDialog {
     id: leaveRoomRoot
diff --git a/resources/qml/dialogs/LogoutDialog.qml b/resources/qml/dialogs/LogoutDialog.qml
index e0e1f231..e79a3e0d 100644
--- a/resources/qml/dialogs/LogoutDialog.qml
+++ b/resources/qml/dialogs/LogoutDialog.qml
@@ -3,9 +3,8 @@
 // SPDX-License-Identifier: GPL-3.0-or-later
 
 import Qt.labs.platform 1.1 as P
-import QtQuick 2.15
-import QtQuick.Controls 2.15
-import im.nheko 1.0
+import QtQuick
+import im.nheko
 
 P.MessageDialog {
     id: logoutRoot
diff --git a/resources/qml/dialogs/PowerLevelEditor.qml b/resources/qml/dialogs/PowerLevelEditor.qml
index 9fc9ee15..17b19c25 100644
--- a/resources/qml/dialogs/PowerLevelEditor.qml
+++ b/resources/qml/dialogs/PowerLevelEditor.qml
@@ -47,7 +47,7 @@ ApplicationWindow {
 
         TabBar {
             id: bar
-            width: parent.width
+            Layout.preferredWidth: parent.width
 
             NhekoTabButton {
                 text: qsTr("Roles")
diff --git a/resources/qml/dialogs/PowerLevelSpacesApplyDialog.qml b/resources/qml/dialogs/PowerLevelSpacesApplyDialog.qml
index 01ec8b61..6a2e74b2 100644
--- a/resources/qml/dialogs/PowerLevelSpacesApplyDialog.qml
+++ b/resources/qml/dialogs/PowerLevelSpacesApplyDialog.qml
@@ -3,13 +3,11 @@
 // SPDX-License-Identifier: GPL-3.0-or-later
 
 import ".."
-import "../ui"
-import Qt.labs.platform 1.1 as Platform
-import QtQuick 2.15
-import QtQuick.Controls 2.3
-import QtQuick.Layouts 1.2
-import QtQuick.Window 2.13
-import im.nheko 1.0
+import QtQuick
+import QtQuick.Controls
+import QtQuick.Layouts
+import QtQuick.Window
+import im.nheko
 
 ApplicationWindow {
     id: applyDialog
diff --git a/resources/qml/dialogs/ReadReceipts.qml b/resources/qml/dialogs/ReadReceipts.qml
index d65de73c..74a4d1d8 100644
--- a/resources/qml/dialogs/ReadReceipts.qml
+++ b/resources/qml/dialogs/ReadReceipts.qml
@@ -78,8 +78,8 @@ ApplicationWindow {
                         Avatar {
                             id: avatar
 
-                            width: Nheko.avatarSize
-                            height: Nheko.avatarSize
+                            Layout.preferredWidth: Nheko.avatarSize
+                            Layout.preferredHeight: Nheko.avatarSize
                             userid: model.mxid
                             url: model.avatarUrl.replace("mxc://", "image://MxcImage/")
                             displayName: model.displayName
diff --git a/resources/qml/dialogs/RoomDirectory.qml b/resources/qml/dialogs/RoomDirectory.qml
index 97943e93..dbf3b459 100644
--- a/resources/qml/dialogs/RoomDirectory.qml
+++ b/resources/qml/dialogs/RoomDirectory.qml
@@ -57,8 +57,9 @@ ApplicationWindow {
 
                     Layout.alignment: Qt.AlignVCenter
                     Layout.rightMargin: Nheko.paddingMedium
-                    width: avatarSize
-                    height: avatarSize
+                    Layout.preferredWidth: roomDirDelegate.avatarSize
+                    Layout.preferredHeight: roomDirDelegate.avatarSize
+
                     url: model.avatarUrl.replace("mxc://", "image://MxcImage/")
                     roomid: model.roomid
                     displayName: model.name
@@ -70,8 +71,7 @@ ApplicationWindow {
                     columns: 2
 
                     Layout.alignment: Qt.AlignLeft
-                    width: parent.width - avatar.width
-                    Layout.preferredWidth: parent.width - avatar.width
+                    Layout.preferredWidth: parent.width - roomAvatar.width
 
                     ElidedLabel {
                         Layout.row: 0
diff --git a/resources/qml/dialogs/RoomMembers.qml b/resources/qml/dialogs/RoomMembers.qml
index 64f21381..afb76398 100644
--- a/resources/qml/dialogs/RoomMembers.qml
+++ b/resources/qml/dialogs/RoomMembers.qml
@@ -37,8 +37,9 @@ ApplicationWindow {
         Avatar {
             id: roomAvatar
 
-            width: 130
-            height: width
+            Layout.preferredHeight: 130
+            Layout.preferredWidth: 130
+
             roomid: members.roomId
             displayName: members.roomName
             Layout.alignment: Qt.AlignHCenter
@@ -130,8 +131,8 @@ ApplicationWindow {
                         Avatar {
                             id: avatar
 
-                            width: Nheko.avatarSize
-                            height: Nheko.avatarSize
+                            Layout.preferredWidth: Nheko.avatarSize
+                            Layout.preferredHeight: Nheko.avatarSize
                             userid: model.mxid
                             url: model.avatarUrl.replace("mxc://", "image://MxcImage/")
                             displayName: model.displayName
diff --git a/resources/qml/dialogs/RoomSettingsDialog.qml b/resources/qml/dialogs/RoomSettingsDialog.qml
index 73dcac8c..9276a9d3 100644
--- a/resources/qml/dialogs/RoomSettingsDialog.qml
+++ b/resources/qml/dialogs/RoomSettingsDialog.qml
@@ -50,8 +50,8 @@ ApplicationWindow {
                 url: roomSettings.roomAvatarUrl.replace("mxc://", "image://MxcImage/")
                 roomid: roomSettings.roomId
                 displayName: roomSettings.roomName
-                height: 130
-                width: 130
+                Layout.preferredHeight: 130
+                Layout.preferredWidth: 130
                 Layout.alignment: Qt.AlignHCenter
                 onClicked: TimelineManager.openImageOverlay(null, roomSettings.roomAvatarUrl, "", 0, 0)
 
diff --git a/resources/qml/dialogs/UserProfile.qml b/resources/qml/dialogs/UserProfile.qml
index 6cf747e3..614ecb56 100644
--- a/resources/qml/dialogs/UserProfile.qml
+++ b/resources/qml/dialogs/UserProfile.qml
@@ -3,7 +3,6 @@
 // SPDX-License-Identifier: GPL-3.0-or-later
 
 import ".."
-import "../device-verification"
 import "../ui"
 import "../components"
 import QtQuick 2.15
@@ -56,8 +55,8 @@ ApplicationWindow {
                 id: displayAvatar
 
                 url: profile.avatarUrl.replace("mxc://", "image://MxcImage/")
-                height: 130
-                width: 130
+                Layout.preferredHeight: 130
+                Layout.preferredWidth: 130
                 displayName: profile.displayName
                 userid: profile.userid
                 Layout.alignment: Qt.AlignHCenter
@@ -498,8 +497,8 @@ ApplicationWindow {
                     Layout.leftMargin: Nheko.paddingMedium
 
                     property int avatarSize: Math.ceil(fontMetrics.lineSpacing * 1.6)
-                    height: avatarSize
-                    width: avatarSize
+                    Layout.preferredHeight: avatarSize
+                    Layout.preferredWidth: avatarSize
                     url: avatarUrl.replace("mxc://", "image://MxcImage/")
                     roomid: roomId
                     displayName: roomName