Skip to content
Snippets Groups Projects
Commit 46e23542 authored by Capucine Berthet's avatar Capucine Berthet Committed by Sébastien Blin
Browse files

messageBar: display "showLess" when needed

GitLab: #1309
GitLab: #1125
Change-Id: I2b443750731170bebe3532338517e5e0e0ed594b
parent 1bbd8e31
No related branches found
No related tags found
No related merge requests found
...@@ -720,6 +720,7 @@ Item { ...@@ -720,6 +720,7 @@ Item {
property string leaveAudioMessage: qsTr("Audio message") property string leaveAudioMessage: qsTr("Audio message")
property string leaveVideoMessage: qsTr("Video message") property string leaveVideoMessage: qsTr("Video message")
property string showMore: qsTr("Show more") property string showMore: qsTr("Show more")
property string showLess: qsTr("Show less")
property string bold: qsTr("Bold") property string bold: qsTr("Bold")
property string italic: qsTr("Italic") property string italic: qsTr("Italic")
......
...@@ -98,6 +98,7 @@ RowLayout { ...@@ -98,6 +98,7 @@ RowLayout {
showMoreButton.indicator.color = hovered ? JamiTheme.chatViewFooterImgHoverColor : JamiTheme.chatViewFooterImgColor; showMoreButton.indicator.color = hovered ? JamiTheme.chatViewFooterImgHoverColor : JamiTheme.chatViewFooterImgColor;
showMoreButton.background.color = hovered ? JamiTheme.hoveredButtonColor : JamiTheme.transparentColor; showMoreButton.background.color = hovered ? JamiTheme.hoveredButtonColor : JamiTheme.transparentColor;
} }
toolTipMoreButton.text = sharePopup.opened ? JamiStrings.showLess : JamiStrings.showMore;
} }
popup: SharePopup { popup: SharePopup {
...@@ -718,11 +719,10 @@ RowLayout { ...@@ -718,11 +719,10 @@ RowLayout {
MaterialToolTip { MaterialToolTip {
id: toolTip id: toolTip
parent: showMoreTypoButton parent: showMoreTypoButton
visible: showMoreTypoButton.hovered && (text.length > 0) visible: showMoreTypoButton.hovered && (text.length > 0)
delay: Qt.styleHints.mousePressAndHoldInterval delay: Qt.styleHints.mousePressAndHoldInterval
text: JamiStrings.showMore text: markdownPopup.visible ? JamiStrings.showLess : JamiStrings.showMore
} }
background: Rectangle { background: Rectangle {
...@@ -747,6 +747,7 @@ RowLayout { ...@@ -747,6 +747,7 @@ RowLayout {
} }
popup: MarkdownPopup { popup: MarkdownPopup {
id: markdownPopup
y: 1.5 * parent.height y: 1.5 * parent.height
x: -parent.width * 2 x: -parent.width * 2
width: 155 width: 155
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment