mirror of
https://git.jami.net/savoirfairelinux/jami-client-qt.git
synced 2025-08-12 10:45:38 +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:
parent
5ee4990534
commit
7146f20b18
2 changed files with 74 additions and 33 deletions
|
@ -237,24 +237,6 @@ BaseModalDialog {
|
||||||
lineHeight: JamiTheme.wizardViewTextLineHeight
|
lineHeight: JamiTheme.wizardViewTextLineHeight
|
||||||
horizontalAlignment: Text.AlignHCenter
|
horizontalAlignment: Text.AlignHCenter
|
||||||
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
|
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
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -203,7 +203,7 @@ Rectangle {
|
||||||
radius: 8
|
radius: 8
|
||||||
color: JamiTheme.primaryBackgroundColor
|
color: JamiTheme.primaryBackgroundColor
|
||||||
border.width: 1
|
border.width: 1
|
||||||
border.color: JamiTheme.tabbarBorderColor
|
border.color: JamiTheme.textColorHovered
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
id: accountLayout
|
id: accountLayout
|
||||||
|
@ -230,6 +230,7 @@ Rectangle {
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
id: name
|
id: name
|
||||||
|
color: JamiTheme.textColor
|
||||||
visible: text !== undefined && text !== ""
|
visible: text !== undefined && text !== ""
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
|
@ -247,6 +248,7 @@ Rectangle {
|
||||||
Text {
|
Text {
|
||||||
id: userId
|
id: userId
|
||||||
text: jamiId
|
text: jamiId
|
||||||
|
color: JamiTheme.textColor
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -352,22 +354,79 @@ Rectangle {
|
||||||
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
|
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
|
||||||
}
|
}
|
||||||
|
|
||||||
TextArea {
|
// Container for TextArea and copy button
|
||||||
id: tokenUriTextArea
|
RowLayout {
|
||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.alignment: Qt.AlignHCenter
|
||||||
Layout.maximumWidth: parent.parent.width - 40
|
spacing: 0
|
||||||
text: tokenUri
|
|
||||||
color: JamiTheme.textColor
|
Rectangle {
|
||||||
font.pointSize: JamiTheme.wizardViewDescriptionFontPixelSize
|
Layout.alignment: Qt.AlignHCenter
|
||||||
horizontalAlignment: Text.AlignHCenter
|
Layout.preferredWidth: contentRow.implicitWidth + 40
|
||||||
readOnly: true
|
Layout.preferredHeight: contentRow.implicitHeight + 20
|
||||||
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
|
color: JamiTheme.jamiIdBackgroundColor
|
||||||
selectByMouse: true
|
|
||||||
background: Rectangle {
|
|
||||||
color: JamiTheme.primaryBackgroundColor
|
|
||||||
radius: 5
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue