From 2af4bc663b550064fdc312234e49642f7658d911 Mon Sep 17 00:00:00 2001 From: cberthet <capucine.berthet@savoirfairelinux.com> Date: Mon, 11 Dec 2023 13:46:07 -0500 Subject: [PATCH] ScrollToBottomButton: new design GitLab: #1325 Change-Id: I7f44aaf51bd825dde06f071106fe93d6b1eae228 --- src/app/constant/JamiStrings.qml | 1 - .../components/ScrollToBottomButton.qml | 49 ++++--------------- 2 files changed, 10 insertions(+), 40 deletions(-) diff --git a/src/app/constant/JamiStrings.qml b/src/app/constant/JamiStrings.qml index 1a3945e47..5418db7b1 100644 --- a/src/app/constant/JamiStrings.qml +++ b/src/app/constant/JamiStrings.qml @@ -354,7 +354,6 @@ Item { property string search: qsTr("Search") // Chatview footer - property string scrollToEnd: qsTr("Scroll to end of conversation") property string typeIndicatorSingle: qsTr("{} is typing…") property string typeIndicatorPlural: qsTr("{} are typing…") property string typeIndicatorMax: qsTr("Several people are typing…") diff --git a/src/app/mainview/components/ScrollToBottomButton.qml b/src/app/mainview/components/ScrollToBottomButton.qml index 033158890..276cabc80 100644 --- a/src/app/mainview/components/ScrollToBottomButton.qml +++ b/src/app/mainview/components/ScrollToBottomButton.qml @@ -27,8 +27,10 @@ Control { signal clicked - height: jumpToLatestText.contentHeight + 15 - width: jumpToLatestText.contentWidth + arrowDropDown.width + 50 + height: 46 + width: 46 + + padding: 11 states: State { id: activeState @@ -60,49 +62,18 @@ Control { } ] - contentItem: Item { - Item { - anchors.centerIn: parent - - height: jumpToLatestText.contentHeight - width: jumpToLatestText.contentWidth + arrowDropDown.width + 3 - - Text { - id: jumpToLatestText + contentItem: ResponsiveImage { + id: arrowDropDown - anchors.right: parent.right - anchors.verticalCenter: parent.verticalCenter - - font.weight: Font.Bold - font.pointSize: JamiTheme.textFontSize + 2 - horizontalAlignment: Text.AlignHCenter - verticalAlignment: Text.AlignVCenter - - text: JamiStrings.scrollToEnd - color: UtilsAdapter.luma(CurrentConversation.color) ? JamiTheme.chatviewTextColorLight : JamiTheme.chatviewTextColorDark - } + anchors.centerIn: parent - ResponsiveImage { - id: arrowDropDown - - anchors.right: jumpToLatestText.left - anchors.rightMargin: 3 - anchors.verticalCenter: parent.verticalCenter - anchors.verticalCenterOffset: 0 - - containerWidth: jumpToLatestText.contentHeight - containerHeight: jumpToLatestText.contentHeight - rotation: -90 - - color: UtilsAdapter.luma(CurrentConversation.color) ? JamiTheme.chatviewTextColorLight : JamiTheme.chatviewTextColorDark - source: JamiResources.back_24dp_svg - } - } + color: JamiTheme.darkTheme ? JamiTheme.chatviewTextColorLight : JamiTheme.chatviewTextColorDark + source: JamiResources.expand_more_24dp_svg } background: Rectangle { radius: 5 - color: CurrentConversation.color + color: JamiTheme.messageInBgColor MouseArea { anchors.fill: parent -- GitLab