diff options
author | Malte E <malte.e@mailbox.org> | 2022-03-03 21:51:26 +0100 |
---|---|---|
committer | Malte E <malte.e@mailbox.org> | 2022-03-03 21:51:26 +0100 |
commit | cf7353c1e9e68737a2890a54fdedfc0526191f71 (patch) | |
tree | 3b6d534e9bf0b8bbfe1becdbaea1441ab1e7631d /resources/qml/dialogs | |
parent | make long topic collapsible (diff) | |
download | nheko-cf7353c1e9e68737a2890a54fdedfc0526191f71.tar.xz |
fix text color and button, copy roomID on click
Diffstat (limited to 'resources/qml/dialogs')
-rw-r--r-- | resources/qml/dialogs/RoomSettings.qml | 45 |
1 files changed, 39 insertions, 6 deletions
diff --git a/resources/qml/dialogs/RoomSettings.qml b/resources/qml/dialogs/RoomSettings.qml index 517fc899..855adc2a 100644 --- a/resources/qml/dialogs/RoomSettings.qml +++ b/resources/qml/dialogs/RoomSettings.qml @@ -113,11 +113,13 @@ ApplicationWindow { font.pixelSize: fontMetrics.font.pixelSize * 2 Layout.fillWidth: true horizontalAlignment: TextEdit.AlignHCenter + color: Nheko.colors.text } Label { text: qsTr("%n member(s)", "", roomSettings.memberCount) Layout.alignment: Qt.AlignHCenter + color: Nheko.colors.text TapHandler { onSingleTapped: TimelineManager.openRoomMembers(Rooms.getRoomById(roomSettings.roomId)) @@ -142,7 +144,7 @@ ApplicationWindow { property bool cut: implicitHeight > 100 property bool showMore clip: true - height: cut && !showMore? 100 : implicitHeight + height: cut && !showMore? 100 : undefined Layout.preferredHeight: height Layout.alignment: Qt.AlignHCenter Layout.fillWidth: true @@ -183,6 +185,7 @@ ApplicationWindow { Label { text: qsTr("SETTINGS") font.bold: true + color: Nheko.colors.text } Item { @@ -192,6 +195,7 @@ ApplicationWindow { Label { text: qsTr("Notifications") Layout.fillWidth: true + color: Nheko.colors.text } ComboBox { @@ -207,6 +211,7 @@ ApplicationWindow { Label { text: qsTr("Room access") Layout.fillWidth: true + color: Nheko.colors.text } ComboBox { @@ -231,6 +236,7 @@ ApplicationWindow { Label { text: qsTr("Encryption") + color: Nheko.colors.text } ToggleButton { @@ -268,6 +274,7 @@ ApplicationWindow { Label { text: qsTr("Sticker & Emote Settings") + color: Nheko.colors.text } Button { @@ -279,6 +286,7 @@ ApplicationWindow { Label { text: qsTr("Hidden events") + color: Nheko.colors.text } HiddenEventsDialog { @@ -307,6 +315,7 @@ ApplicationWindow { Label { text: qsTr("INFO") font.bold: true + color: Nheko.colors.text } Item { @@ -315,24 +324,48 @@ ApplicationWindow { Label { text: qsTr("Internal ID") + color: Nheko.colors.text } - Label { - text: roomSettings.roomId - font.pixelSize: Math.floor(fontMetrics.font.pixelSize * 0.8) - wrapMode: Text.WrapAnywhere + AbstractButton { // AbstractButton does not allow setting text color Layout.alignment: Qt.AlignRight Layout.fillWidth: true + Layout.preferredHeight: idLabel.height + Label { // TextEdit does not trigger onClicked + id: idLabel + text: roomSettings.roomId + font.pixelSize: Math.floor(fontMetrics.font.pixelSize * 0.8) + color: Nheko.colors.text + width: parent.width + wrapMode: Text.WrapAnywhere + ToolTip.text: qsTr("Copied to clipboard") + ToolTip.visible: toolTipTimer.running + } + TextEdit{ // label does not allow selection + id: textEdit + visible: false + text: roomSettings.roomId + } + onClicked: { + textEdit.selectAll() + textEdit.copy() + toolTipTimer.start() + } + Timer { + id: toolTipTimer + } } Label { text: qsTr("Room Version") + color: Nheko.colors.text } Label { text: roomSettings.roomVersion font.pixelSize: fontMetrics.font.pixelSize Layout.alignment: Qt.AlignRight + color: Nheko.colors.text } } @@ -341,7 +374,7 @@ ApplicationWindow { Button { id: showMoreButton x: contentLayout1.showMorePos.x - y: Math.min(contentLayout1.showMorePos.y-flickable.contentY,parent.height-height) + y: Math.min(contentLayout1.showMorePos.y-flickable.contentY,flickable.height-height) visible: roomTopic.cut text: roomTopic.showMore? "show less" : "show more" onClicked: {roomTopic.showMore = !roomTopic.showMore |