From 550b8fd04acfe9bda4797f01facc22d19121d0c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Tinkl?= Date: Mon, 3 Oct 2022 14:16:44 +0200 Subject: [PATCH] fix(ChatMessagesView): Loading spinner and scroll to bottom button overlap - remove the extra spinner (ok'ed by John and Benj) - use the more modern StatusIcon, w/o the unconditional ColorOverlay - some minor cleanup Closes: #7645 --- ui/app/AppLayouts/Chat/views/ChatContentView.qml | 13 ------------- ui/app/AppLayouts/Chat/views/ChatMessagesView.qml | 12 +++--------- ui/imports/shared/status/StatusChatInput.qml | 2 -- .../shared/status/StatusChatInputReplyArea.qml | 13 ++++--------- 4 files changed, 7 insertions(+), 33 deletions(-) diff --git a/ui/app/AppLayouts/Chat/views/ChatContentView.qml b/ui/app/AppLayouts/Chat/views/ChatContentView.qml index bef0bfd63a..a9ad062a93 100644 --- a/ui/app/AppLayouts/Chat/views/ChatContentView.qml +++ b/ui/app/AppLayouts/Chat/views/ChatContentView.qml @@ -168,19 +168,6 @@ ColumnLayout { + chatInput.anchors.topMargin + chatInput.anchors.bottomMargin - Loader { - id: loadingMessagesIndicator - active: root.rootStore.loadingHistoryMessagesInProgress - visible: root.rootStore.loadingHistoryMessagesInProgress - sourceComponent: LoadingAnimation { } - anchors { - right: parent.right - bottom: chatInput.top - rightMargin: Style.current.padding - bottomMargin: Style.current.padding - } - } - StatusChatInput { id: chatInput diff --git a/ui/app/AppLayouts/Chat/views/ChatMessagesView.qml b/ui/app/AppLayouts/Chat/views/ChatMessagesView.qml index a7ef0c4cff..e48cdb9620 100644 --- a/ui/app/AppLayouts/Chat/views/ChatMessagesView.qml +++ b/ui/app/AppLayouts/Chat/views/ChatMessagesView.qml @@ -213,21 +213,15 @@ Item { anchors.leftMargin: Style.current.halfPadding } - SVGImage { + StatusIcon { id: arrowImage width: 24 height: 24 anchors.verticalCenter: parent.verticalCenter anchors.left: nbMessages.right - source: Style.svg("leave_chat") + icon: "arrow-down" anchors.leftMargin: nbMessages.visible ? scrollDownButton.buttonPadding : 0 - rotation: -90 - - ColorOverlay { - anchors.fill: parent - source: parent - color: Style.current.pillButtonTextColor - } + color: Style.current.pillButtonTextColor } MouseArea { diff --git a/ui/imports/shared/status/StatusChatInput.qml b/ui/imports/shared/status/StatusChatInput.qml index a90f865b8d..5e4eef20ed 100644 --- a/ui/imports/shared/status/StatusChatInput.qml +++ b/ui/imports/shared/status/StatusChatInput.qml @@ -1,8 +1,6 @@ import QtQuick 2.13 import QtQuick.Controls 2.13 -import QtGraphicalEffects 1.13 import QtQuick.Layouts 1.13 -import QtMultimedia 5.13 import QtQuick.Dialogs 1.3 import DotherSide 0.1 diff --git a/ui/imports/shared/status/StatusChatInputReplyArea.qml b/ui/imports/shared/status/StatusChatInputReplyArea.qml index 8d43ce8d11..7f8ca700b4 100644 --- a/ui/imports/shared/status/StatusChatInputReplyArea.qml +++ b/ui/imports/shared/status/StatusChatInputReplyArea.qml @@ -1,11 +1,11 @@ import QtQuick 2.13 import QtQuick.Controls 2.13 -import QtGraphicalEffects 1.13 import utils 1.0 import shared 1.0 import shared.panels 1.0 +import StatusQ.Core 0.1 import StatusQ.Core.Utils 0.1 as StatusQUtils Rectangle { @@ -108,18 +108,13 @@ Rectangle { anchors.topMargin: 4 anchors.right: parent.right anchors.rightMargin: 4 - contentItem: SVGImage { + contentItem: StatusIcon { id: iconImg source: Style.svg("close") + color: Style.current.textColor + sourceSize: Qt.size(width, height) width: closeBtn.width height: closeBtn.height - - ColorOverlay { - anchors.fill: iconImg - source: iconImg - color: Style.current.textColor - antialiasing: true - } } background: Rectangle { color: "transparent"