diff options
author | DeepBlueV7.X <nicolas.werner@hotmail.de> | 2022-03-16 03:09:34 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-16 03:09:34 +0100 |
commit | a35f5e81cd33edde0c0881b3520dac5f43b6f0dd (patch) | |
tree | e258b95b9e23e8831ba035cd4a41a13a8d3bac02 /resources/qml | |
parent | Update gstreamer in flatpak to 1.20 (diff) | |
parent | small rework of the reply popup (diff) | |
download | nheko-a35f5e81cd33edde0c0881b3520dac5f43b6f0dd.tar.xz |
Merge pull request #989 from maltee1/improve_reply_popup
small rework of the reply popup
Diffstat (limited to 'resources/qml')
-rw-r--r-- | resources/qml/MessageInput.qml | 1 | ||||
-rw-r--r-- | resources/qml/ReplyPopup.qml | 30 |
2 files changed, 17 insertions, 14 deletions
diff --git a/resources/qml/MessageInput.qml b/resources/qml/MessageInput.qml index f8ab494b..9a21ac05 100644 --- a/resources/qml/MessageInput.qml +++ b/resources/qml/MessageInput.qml @@ -446,7 +446,6 @@ Rectangle { width: 22 height: 22 image: ":/icons/icons/ui/send.svg" - Layout.rightMargin: 8 ToolTip.visible: hovered ToolTip.text: qsTr("Send") onClicked: { diff --git a/resources/qml/ReplyPopup.qml b/resources/qml/ReplyPopup.qml index ef0d7c60..914f5d33 100644 --- a/resources/qml/ReplyPopup.qml +++ b/resources/qml/ReplyPopup.qml @@ -15,7 +15,7 @@ Rectangle { Layout.fillWidth: true visible: room && (room.reply || room.edit) // Height of child, plus margins, plus border - implicitHeight: (room && room.reply ? replyPreview.height : closeEditButton.height) + 10 + implicitHeight: (room && room.reply ? replyPreview.height : closeEditButton.height) + Nheko.paddingSmall color: Nheko.colors.window z: 3 @@ -27,10 +27,11 @@ Rectangle { visible: room && room.reply anchors.left: parent.left - anchors.leftMargin: 2 * 22 + 3 * 16 - anchors.right: closeReplyButton.left - anchors.rightMargin: 2 * 22 + 3 * 16 - anchors.bottom: parent.bottom + anchors.leftMargin: replyPopup.width < 450? Nheko.paddingSmall : (CallManager.callsSupported? 2*(22+16) : 1*(22+16)) + anchors.right: parent.right + anchors.rightMargin: replyPopup.width < 450? 2*(22+16) : 3*(22+16) + anchors.top: parent.top + anchors.topMargin: Nheko.paddingSmall userColor: TimelineManager.userColor(modelData.userId, Nheko.colors.window) blurhash: modelData.blurhash ?? "" body: modelData.body ?? "" @@ -54,9 +55,9 @@ Rectangle { id: closeReplyButton visible: room && room.reply - anchors.right: parent.right - anchors.rightMargin: 16 + anchors.right: replyPreview.right anchors.top: replyPreview.top + anchors.margins: Nheko.paddingSmall hoverEnabled: true width: 16 height: 16 @@ -66,16 +67,19 @@ Rectangle { onClicked: room.reply = undefined } - Button { + ImageButton { id: closeEditButton visible: room && room.edit - anchors.left: parent.left - anchors.rightMargin: 16 - anchors.topMargin: 10 + anchors.right: parent.right + anchors.margins: 8 anchors.top: parent.top - //height: 16 - text: qsTr("Cancel edit") + hoverEnabled: true + image: ":/icons/icons/ui/dismiss_edit.svg" + width: 22 + height: 22 + ToolTip.visible: closeEditButton.hovered + ToolTip.text: qsTr("Cancel Edit") onClicked: room.edit = undefined } |