summary refs log tree commit diff
diff options
context:
space:
mode:
authorJedi18 <targetakhil@gmail.com>2021-02-13 20:46:40 +0530
committerJedi18 <targetakhil@gmail.com>2021-02-13 20:46:40 +0530
commit65403521239c202e7a3cdfb5a52fbcb700656474 (patch)
tree9ae6ddab30dbaa11d2f519e1b3c1a62210011aac
parentadded room topic (diff)
downloadnheko-65403521239c202e7a3cdfb5a52fbcb700656474.tar.xz
fix roomsetting layout
-rw-r--r--resources/qml/RoomSettings.qml48
-rw-r--r--resources/res.qrc1
2 files changed, 18 insertions, 31 deletions
diff --git a/resources/qml/RoomSettings.qml b/resources/qml/RoomSettings.qml

index 2f6f1866..bc9406d4 100644 --- a/resources/qml/RoomSettings.qml +++ b/resources/qml/RoomSettings.qml
@@ -26,10 +26,7 @@ ApplicationWindow { ColumnLayout { id: contentLayout1 - anchors.left: parent.left - anchors.right: parent.right - anchors.top: parent.top - anchors.bottom: undefined + anchors.fill: parent anchors.margins: 10 spacing: 10 @@ -104,32 +101,21 @@ ApplicationWindow { visible: roomSettings.canChangeNameAndTopic onClicked: roomSettings.openEditModal() } - } - ScrollView { - id: topicScroll - anchors.left: parent.left - anchors.right: parent.right - anchors.top: contentLayout1.bottom - anchors.bottom: undefined - anchors.margins: 10 - height: 100 + ScrollView { + Layout.maximumHeight: 75 + ScrollBar.horizontal.policy: ScrollBar.AlwaysOff + ScrollBar.vertical.policy: ScrollBar.AlwaysOn + Layout.alignment: Qt.AlignHCenter + Layout.fillWidth: true - TextArea { - text: roomSettings.roomTopic - background: null + TextArea { + text: roomSettings.roomTopic + wrapMode: TextEdit.WordWrap + readOnly: true + background: null + } } - } - - ColumnLayout { - id: contentLayout2 - - anchors.left: parent.left - anchors.right: parent.right - anchors.top: topicScroll.bottom - anchors.bottom: parent.bottom - anchors.margins: 10 - spacing: 10 MatrixText { text: "SETTINGS" @@ -178,8 +164,8 @@ ApplicationWindow { Layout.fillWidth: true } - Switch { - id: encryptionSwitch + ToggleButton { + id: encryptionToggle checked: roomSettings.isEncryptionEnabled onToggled: { @@ -209,7 +195,7 @@ ApplicationWindow { } onRejected: { - encryptionSwitch.checked = false + encryptionToggle.checked = false } standardButtons: Dialog.Ok | Dialog.Cancel @@ -227,7 +213,7 @@ ApplicationWindow { Layout.fillWidth: true } - Switch { + ToggleButton { ToolTip.text: qsTr("Whether or not the client should respond automatically with the session keys upon request. Use with caution, this is a temporary measure to test the E2E implementation until device verification is completed.") diff --git a/resources/res.qrc b/resources/res.qrc
index 24b41179..12d098c0 100644 --- a/resources/res.qrc +++ b/resources/res.qrc
@@ -128,6 +128,7 @@ <file>qml/EncryptionIndicator.qml</file> <file>qml/ImageButton.qml</file> <file>qml/MatrixText.qml</file> + <file>qml/ToggleButton.qml</file> <file>qml/MessageInput.qml</file> <file>qml/MessageView.qml</file> <file>qml/NhekoBusyIndicator.qml</file>