1
0
Fork 0
mirror of https://git.jami.net/savoirfairelinux/jami-client-qt.git synced 2025-07-21 07:55:25 +02:00

UI/UX: fix link device issues

- Make token copyable
- Fix UI in dark mode
- Remove text animation for export side

Gitlab: #1695
Change-Id: Idb701867ba4998bb75715e598ddac66a5e1ac8ca
This commit is contained in:
Kateryna Kostiuk 2025-03-10 16:57:50 -04:00 committed by Andreas Traczyk
parent 5ee4990534
commit 7146f20b18
2 changed files with 74 additions and 33 deletions

View file

@ -237,24 +237,6 @@ BaseModalDialog {
lineHeight: JamiTheme.wizardViewTextLineHeight
horizontalAlignment: Text.AlignHCenter
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
opacity: 1
SequentialAnimation on opacity {
running: true
loops: Animation.Infinite
NumberAnimation {
from: 1
to: 0.3
duration: 1000
easing.type: Easing.InOutQuad
}
NumberAnimation {
from: 0.3
to: 1
duration: 1000
easing.type: Easing.InOutQuad
}
}
}
}

View file

@ -203,7 +203,7 @@ Rectangle {
radius: 8
color: JamiTheme.primaryBackgroundColor
border.width: 1
border.color: JamiTheme.tabbarBorderColor
border.color: JamiTheme.textColorHovered
RowLayout {
id: accountLayout
@ -230,6 +230,7 @@ Rectangle {
Text {
id: name
color: JamiTheme.textColor
visible: text !== undefined && text !== ""
Connections {
@ -247,6 +248,7 @@ Rectangle {
Text {
id: userId
text: jamiId
color: JamiTheme.textColor
}
}
}
@ -352,22 +354,79 @@ Rectangle {
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
}
TextArea {
id: tokenUriTextArea
// Container for TextArea and copy button
RowLayout {
Layout.alignment: Qt.AlignHCenter
Layout.maximumWidth: parent.parent.width - 40
text: tokenUri
color: JamiTheme.textColor
font.pointSize: JamiTheme.wizardViewDescriptionFontPixelSize
horizontalAlignment: Text.AlignHCenter
readOnly: true
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
selectByMouse: true
background: Rectangle {
color: JamiTheme.primaryBackgroundColor
spacing: 0
Rectangle {
Layout.alignment: Qt.AlignHCenter
Layout.preferredWidth: contentRow.implicitWidth + 40
Layout.preferredHeight: contentRow.implicitHeight + 20
color: JamiTheme.jamiIdBackgroundColor
radius: 5
border.width: 1
border.color: JamiTheme.textColor
RowLayout {
id: contentRow
anchors.centerIn: parent
spacing: 5
TextEdit {
id: tokenUriTextArea
text: tokenUri
color: JamiTheme.textColor
font.pointSize: JamiTheme.wizardViewDescriptionFontPixelSize
horizontalAlignment: Text.AlignHCenter
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
selectByMouse: true
readOnly: true
cursorVisible: false
}
// Copy button
PushButton {
id: copyButton
Layout.alignment: Qt.AlignVCenter
preferredSize: 30
radius: 5
normalColor: JamiTheme.transparentColor
imageContainerWidth: JamiTheme.pushButtonSize
imageContainerHeight: JamiTheme.pushButtonSize
border.color: JamiTheme.transparentColor
imageColor: JamiTheme.tintedBlue
source: JamiResources.content_copy_24dp_svg
toolTipText: JamiStrings.copy
onClicked: {
UtilsAdapter.setClipboardText(tokenUri);
}
}
}
}
MouseArea {
parent: tokenUriTextArea
anchors.fill: parent
acceptedButtons: Qt.RightButton
propagateComposedEvents: true
onClicked: function(mouse) {
if (mouse.button === Qt.RightButton) {
mouse.accepted = true
contextMenu.open()
}
}
}
Menu {
id: contextMenu
MenuItem {
text: JamiStrings.copy
enabled: tokenUriTextArea.selectedText.length > 0
onTriggered: {
UtilsAdapter.setClipboardText(tokenUri);
}
}
}
}
}