From 0d3aed0611e5bdbbff144a6e9eec68a22a67206b Mon Sep 17 00:00:00 2001 From: MishkaRogachev Date: Wed, 13 Jul 2022 15:29:38 +0300 Subject: [PATCH] fix(@desktop): Fix scrolling twitches using ScrollView amd Flickable items Close #5781 --- ui/StatusQ | 2 +- .../Browser/popups/JSDialogWindow.qml | 5 +++-- .../Browser/popups/SignMessageModal.qml | 7 ++++--- .../AppLayouts/Chat/panels/ContactListPanel.qml | 4 ++-- .../communities/CommunityEditSettingsPanel.qml | 8 +------- .../Chat/popups/ActivityCenterPopup.qml | 11 ++++++----- .../AppLayouts/Chat/popups/PublicChatPopup.qml | 4 ++-- .../Chat/popups/community/CommunitiesPopup.qml | 3 +-- .../popups/community/CommunityDetailPopup.qml | 5 ++--- .../popups/community/CreateCategoryPopup.qml | 3 +-- .../popups/community/CreateChannelPopup.qml | 4 +--- .../community/MembershipRequestsPopup.qml | 4 +--- .../Chat/views/CommunityColumnView.qml | 3 +-- .../Chat/views/ContactsColumnView.qml | 17 ++++++++++++----- .../CommunitiesPortalLayout.qml | 1 - .../panels/CommunityColorPanel.qml | 4 +--- .../panels/CommunityTagsPanel.qml | 4 +--- .../popups/CreateCommunityPopup.qml | 7 +------ .../panels/TokenSettingsModalContent.qml | 7 ++----- ui/app/AppLayouts/Profile/popups/ENSPopup.qml | 4 +++- .../Profile/popups/WakuNodesModal.qml | 4 +--- .../popups/backupseed/Acknowledgements.qml | 15 ++++++--------- .../popups/backupseed/BackupSeedStepBase.qml | 7 ++----- ui/app/AppLayouts/Profile/views/EnsListView.qml | 4 +--- .../Profile/views/EnsTermsAndConditionsView.qml | 7 ++----- .../AppLayouts/Profile/views/EnsWelcomeView.qml | 4 +--- ui/app/AppLayouts/Profile/views/LeftTabView.qml | 10 ++++++---- .../Profile/views/SettingsContentBase.qml | 5 ++--- .../Wallet/panels/CollectiblesContent.qml | 8 ++++---- .../Wallet/popups/AddAccountModal.qml | 7 +++---- .../Wallet/popups/NetworkSelectPopup.qml | 3 +-- .../Wallet/views/CollectiblesView.qml | 8 ++++---- ui/app/AppLayouts/Wallet/views/LeftTabView.qml | 1 + .../Wallet/views/SavedAddressesView.qml | 6 ++---- .../shared/popups/CommunityIntroDialog.qml | 8 +------- ui/imports/shared/popups/SendModal.qml | 7 +++---- ui/imports/shared/status/StatusChatInput.qml | 3 ++- ui/imports/shared/status/StatusEmojiPopup.qml | 7 ++++--- ui/imports/shared/status/StatusEmojiSection.qml | 3 +-- ui/imports/shared/status/StatusGifPopup.qml | 4 ++-- .../shared/status/StatusStickersPopup.qml | 6 +++--- ui/imports/shared/views/AssetsView.qml | 4 +++- ui/imports/shared/views/ExistingContacts.qml | 4 +++- ui/imports/shared/views/NetworkSelector.qml | 4 ++-- ui/imports/shared/views/TransactionPreview.qml | 3 ++- 45 files changed, 108 insertions(+), 141 deletions(-) diff --git a/ui/StatusQ b/ui/StatusQ index 21669aba17..930fa3daf0 160000 --- a/ui/StatusQ +++ b/ui/StatusQ @@ -1 +1 @@ -Subproject commit 21669aba17b55345bb7b8bae37b2963e8f79045e +Subproject commit 930fa3daf01ef984d5e414b5ad6e322ce1eb02d0 diff --git a/ui/app/AppLayouts/Browser/popups/JSDialogWindow.qml b/ui/app/AppLayouts/Browser/popups/JSDialogWindow.qml index b56a0b5a39..26d071a7a5 100644 --- a/ui/app/AppLayouts/Browser/popups/JSDialogWindow.qml +++ b/ui/app/AppLayouts/Browser/popups/JSDialogWindow.qml @@ -3,9 +3,10 @@ import QtQuick.Controls 2.13 import QtQuick.Layouts 1.13 import QtWebEngine 1.10 -import shared.controls 1.0 +import StatusQ.Core 0.1 import StatusQ.Controls 0.1 +import shared.controls 1.0 import shared.popups 1.0 import utils 1.0 @@ -36,7 +37,7 @@ ModalPopup { } } - ScrollView { + StatusScrollView { id: svMessage width: parent.width height: 100 diff --git a/ui/app/AppLayouts/Browser/popups/SignMessageModal.qml b/ui/app/AppLayouts/Browser/popups/SignMessageModal.qml index 81f1351611..342579c659 100644 --- a/ui/app/AppLayouts/Browser/popups/SignMessageModal.qml +++ b/ui/app/AppLayouts/Browser/popups/SignMessageModal.qml @@ -4,15 +4,16 @@ import QtQuick.Layouts 1.13 import QtQuick.Dialogs 1.3 import QtGraphicalEffects 1.13 -import utils 1.0 - +import StatusQ.Core 0.1 import StatusQ.Controls 0.1 import StatusQ.Popups 0.1 +import utils 1.0 import shared 1.0 import shared.views 1.0 import shared.panels 1.0 import shared.popups 1.0 + import "../stores" StatusModal { @@ -152,7 +153,7 @@ StatusModal { anchors.fill: parent anchors.leftMargin: Style.current.padding anchors.rightMargin: Style.current.padding - ScrollView { + StatusScrollView { width: parent.width height: 150 TextArea { diff --git a/ui/app/AppLayouts/Chat/panels/ContactListPanel.qml b/ui/app/AppLayouts/Chat/panels/ContactListPanel.qml index c9e8e56c62..a216ebb2ee 100644 --- a/ui/app/AppLayouts/Chat/panels/ContactListPanel.qml +++ b/ui/app/AppLayouts/Chat/panels/ContactListPanel.qml @@ -1,12 +1,13 @@ import QtQuick 2.13 import QtQuick.Controls 2.3 +import StatusQ.Core 0.1 import StatusQ.Components 0.1 import StatusQ.Controls 0.1 import utils 1.0 -ScrollView { +StatusScrollView { id: contactListPanel property alias model: groupMembers.model @@ -19,7 +20,6 @@ ScrollView { ScrollBar.horizontal.policy: ScrollBar.AlwaysOff ScrollBar.vertical.policy: groupMembers.contentHeight > groupMembers.height ? ScrollBar.AlwaysOn : ScrollBar.AlwaysOff - ListView { id: groupMembers anchors.fill: parent diff --git a/ui/app/AppLayouts/Chat/panels/communities/CommunityEditSettingsPanel.qml b/ui/app/AppLayouts/Chat/panels/communities/CommunityEditSettingsPanel.qml index 58e58bdde3..7d48e16b05 100644 --- a/ui/app/AppLayouts/Chat/panels/communities/CommunityEditSettingsPanel.qml +++ b/ui/app/AppLayouts/Chat/panels/communities/CommunityEditSettingsPanel.qml @@ -21,7 +21,7 @@ import "../../controls/community" import "../../../CommunitiesPortal/controls" import "../../../CommunitiesPortal/panels" -Flickable { +StatusScrollView { id: root property alias name: nameInput.text @@ -45,12 +45,6 @@ Flickable { readonly property bool saveChangesButtonEnabled: true - contentWidth: layout.width - contentHeight: layout.height - clip: true - interactive: contentHeight > height - flickableDirection: Flickable.VerticalFlick - implicitWidth: layout.implicitWidth implicitHeight: layout.implicitHeight diff --git a/ui/app/AppLayouts/Chat/popups/ActivityCenterPopup.qml b/ui/app/AppLayouts/Chat/popups/ActivityCenterPopup.qml index 6b9ffc9225..9559124772 100644 --- a/ui/app/AppLayouts/Chat/popups/ActivityCenterPopup.qml +++ b/ui/app/AppLayouts/Chat/popups/ActivityCenterPopup.qml @@ -2,15 +2,17 @@ import QtQuick 2.13 import QtQuick.Controls 2.13 import QtQml.Models 2.13 import QtGraphicalEffects 1.13 + +import StatusQ.Core 0.1 +import StatusQ.Controls 0.1 + import shared 1.0 import shared.popups 1.0 +import utils 1.0 -import StatusQ.Controls 0.1 import "../views" import "../panels" -import utils 1.0 - Popup { enum Filter { All, @@ -88,14 +90,13 @@ Popup { } } - ScrollView { + StatusScrollView { id: scrollView anchors.top: activityCenterTopBar.bottom anchors.topMargin: 13 anchors.bottom: parent.bottom anchors.bottomMargin: Style.current.smallPadding width: parent.width - clip: true ScrollBar.horizontal.policy: ScrollBar.AlwaysOff diff --git a/ui/app/AppLayouts/Chat/popups/PublicChatPopup.qml b/ui/app/AppLayouts/Chat/popups/PublicChatPopup.qml index 5773bffd1e..88a68bd524 100644 --- a/ui/app/AppLayouts/Chat/popups/PublicChatPopup.qml +++ b/ui/app/AppLayouts/Chat/popups/PublicChatPopup.qml @@ -5,6 +5,7 @@ import QtQuick.Layouts 1.13 import utils 1.0 import shared.controls 1.0 +import StatusQ.Core 0.1 import StatusQ.Controls 0.1 import shared.panels 1.0 @@ -71,9 +72,8 @@ ModalPopup { validationError: channelNameValidationError } - ScrollView { + StatusScrollView { id: sview - clip: true anchors.top: channelName.bottom anchors.topMargin: Style.current.smallPadding diff --git a/ui/app/AppLayouts/Chat/popups/community/CommunitiesPopup.qml b/ui/app/AppLayouts/Chat/popups/community/CommunitiesPopup.qml index cfabf848c3..0dcbbcfad2 100644 --- a/ui/app/AppLayouts/Chat/popups/community/CommunitiesPopup.qml +++ b/ui/app/AppLayouts/Chat/popups/community/CommunitiesPopup.qml @@ -69,13 +69,12 @@ StatusModal { StatusModalDivider { topPadding: 8 } - ScrollView { + StatusScrollView { width: parent.width ScrollBar.horizontal.policy: ScrollBar.AlwaysOff topPadding: 8 bottomPadding: 8 height: 400 - clip: true ListView { anchors.fill: parent diff --git a/ui/app/AppLayouts/Chat/popups/community/CommunityDetailPopup.qml b/ui/app/AppLayouts/Chat/popups/community/CommunityDetailPopup.qml index d31beef0b8..c415eee010 100644 --- a/ui/app/AppLayouts/Chat/popups/community/CommunityDetailPopup.qml +++ b/ui/app/AppLayouts/Chat/popups/community/CommunityDetailPopup.qml @@ -110,15 +110,14 @@ StatusModal { } } - ScrollView { + StatusScrollView { width: root.width height: 300 ScrollBar.horizontal.policy: ScrollBar.AlwaysOff - clip: true + ListView { id: chatList anchors.fill: parent - clip: true model: community.chats boundsBehavior: Flickable.StopAtBounds delegate: StatusListItem { diff --git a/ui/app/AppLayouts/Chat/popups/community/CreateCategoryPopup.qml b/ui/app/AppLayouts/Chat/popups/community/CreateCategoryPopup.qml index 2b20fd0d0e..5cd51462b8 100644 --- a/ui/app/AppLayouts/Chat/popups/community/CreateCategoryPopup.qml +++ b/ui/app/AppLayouts/Chat/popups/community/CreateCategoryPopup.qml @@ -71,7 +71,7 @@ StatusModal { bottomPadding: 8 } - ScrollView { + StatusScrollView { id: scrollView width: root.width @@ -82,7 +82,6 @@ StatusModal { contentHeight: content.height ScrollBar.horizontal.policy: ScrollBar.AlwaysOff - clip: true function scrollBackUp() { vScrollBar.setPosition(0) diff --git a/ui/app/AppLayouts/Chat/popups/community/CreateChannelPopup.qml b/ui/app/AppLayouts/Chat/popups/community/CreateChannelPopup.qml index c067d2e752..038b0d85df 100644 --- a/ui/app/AppLayouts/Chat/popups/community/CreateChannelPopup.qml +++ b/ui/app/AppLayouts/Chat/popups/community/CreateChannelPopup.qml @@ -76,7 +76,7 @@ StatusModal { communityColorValidator) === "" } - contentItem: ScrollView { + contentItem: StatusScrollView { id: scrollView @@ -86,12 +86,10 @@ StatusModal { property alias channelDescription: descriptionTextArea property alias channelColorDialog: colorDialog - contentHeight: content.height height: Math.min(content.height, 432) width: popup.width ScrollBar.horizontal.policy: ScrollBar.AlwaysOff - clip: true function scrollBackUp() { vScrollBar.setPosition(0) diff --git a/ui/app/AppLayouts/Chat/popups/community/MembershipRequestsPopup.qml b/ui/app/AppLayouts/Chat/popups/community/MembershipRequestsPopup.qml index f7428ce8a2..8ecefe3357 100644 --- a/ui/app/AppLayouts/Chat/popups/community/MembershipRequestsPopup.qml +++ b/ui/app/AppLayouts/Chat/popups/community/MembershipRequestsPopup.qml @@ -43,19 +43,17 @@ StatusModal { width: parent.width } - ScrollView { + StatusScrollView { width: parent.width ScrollBar.horizontal.policy: ScrollBar.AlwaysOff topPadding: 8 bottomPadding: 8 height: 300 - clip: true ListView { id: membershipRequestList anchors.fill: parent model: popup.communityData.pendingRequestsToJoin - clip: true delegate: StatusListItem { anchors.horizontalCenter: parent.horizontalCenter diff --git a/ui/app/AppLayouts/Chat/views/CommunityColumnView.qml b/ui/app/AppLayouts/Chat/views/CommunityColumnView.qml index a8ba468f64..43e11c1291 100644 --- a/ui/app/AppLayouts/Chat/views/CommunityColumnView.qml +++ b/ui/app/AppLayouts/Chat/views/CommunityColumnView.qml @@ -100,7 +100,7 @@ Item { } } - ScrollView { + StatusScrollView { id: chatGroupsContainer anchors.top: membershipRequests.bottom anchors.topMargin: Style.current.padding @@ -112,7 +112,6 @@ Item { width: parent.width ScrollBar.horizontal.policy: ScrollBar.AlwaysOff - clip: true contentHeight: communityChatListAndCategories.height + bannerColumn.height + Style.current.bigPadding diff --git a/ui/app/AppLayouts/Chat/views/ContactsColumnView.qml b/ui/app/AppLayouts/Chat/views/ContactsColumnView.qml index 48b7016205..90a6cfa5ad 100644 --- a/ui/app/AppLayouts/Chat/views/ContactsColumnView.qml +++ b/ui/app/AppLayouts/Chat/views/ContactsColumnView.qml @@ -138,18 +138,16 @@ Item { } // chat list - ScrollView { + StatusScrollView { + id: scrollView Layout.fillWidth: true Layout.fillHeight: true - contentHeight: channelList.childrenRect.height ScrollBar.horizontal.policy: ScrollBar.AlwaysOff - clip: true - StatusChatList { id: channelList - width: parent.width + width: scrollView.availableWidth model: root.chatSectionModule.model highlightItem: !root.store.openCreateChat onChatItemSelected: { @@ -236,6 +234,15 @@ Item { } } } + + EmptyViewPanel { + id: emptyViewAndSuggestions + visible: !localAccountSensitiveSettings.hideChannelSuggestions + anchors.top: channelList.bottom + anchors.topMargin: Style.current.padding + rootStore: root.store + onSuggestedMessageClicked: chatSectionModule.createPublicChat(channel) + } } } diff --git a/ui/app/AppLayouts/CommunitiesPortal/CommunitiesPortalLayout.qml b/ui/app/AppLayouts/CommunitiesPortal/CommunitiesPortalLayout.qml index 740204693c..f988d484d2 100644 --- a/ui/app/AppLayouts/CommunitiesPortal/CommunitiesPortalLayout.qml +++ b/ui/app/AppLayouts/CommunitiesPortal/CommunitiesPortalLayout.qml @@ -38,7 +38,6 @@ StatusScrollView { contentHeight: column.height + d.layoutVMargin contentWidth: column.width + d.layoutHMargin - clip: true ColumnLayout { id: column diff --git a/ui/app/AppLayouts/CommunitiesPortal/panels/CommunityColorPanel.qml b/ui/app/AppLayouts/CommunitiesPortal/panels/CommunityColorPanel.qml index 36b1732541..2ba7a5150f 100644 --- a/ui/app/AppLayouts/CommunitiesPortal/panels/CommunityColorPanel.qml +++ b/ui/app/AppLayouts/CommunitiesPortal/panels/CommunityColorPanel.qml @@ -9,7 +9,7 @@ import StatusQ.Controls.Validators 0.1 import StatusQ.Components 0.1 import StatusQ.Popups 0.1 -ScrollView { +StatusScrollView { id: root property string title: qsTr("Community Colour") @@ -35,8 +35,6 @@ ScrollView { hexInput.text = color.toString(); } - contentHeight: column.height - ScrollBar.vertical.policy: ScrollBar.AsNeeded ScrollBar.horizontal.policy: ScrollBar.AlwaysOff diff --git a/ui/app/AppLayouts/CommunitiesPortal/panels/CommunityTagsPanel.qml b/ui/app/AppLayouts/CommunitiesPortal/panels/CommunityTagsPanel.qml index 709f06efcb..bab56a8be8 100644 --- a/ui/app/AppLayouts/CommunitiesPortal/panels/CommunityTagsPanel.qml +++ b/ui/app/AppLayouts/CommunitiesPortal/panels/CommunityTagsPanel.qml @@ -10,7 +10,7 @@ import StatusQ.Popups 0.1 import utils 1.0 -ScrollView { +StatusScrollView { id: root property string tags @@ -61,8 +61,6 @@ ScrollView { } onSelectedTagsChanged: updateSelectedTags() - contentHeight: column.height - ScrollBar.vertical.policy: ScrollBar.AsNeeded ScrollBar.horizontal.policy: ScrollBar.AlwaysOff diff --git a/ui/app/AppLayouts/CommunitiesPortal/popups/CreateCommunityPopup.qml b/ui/app/AppLayouts/CommunitiesPortal/popups/CreateCommunityPopup.qml index 6b792f300f..1f9bd367d2 100644 --- a/ui/app/AppLayouts/CommunitiesPortal/popups/CreateCommunityPopup.qml +++ b/ui/app/AppLayouts/CommunitiesPortal/popups/CreateCommunityPopup.qml @@ -41,13 +41,8 @@ StatusStackModal { } stackItems: [ - Flickable { + StatusScrollView { id: generalView - clip: true - contentHeight: generalViewLayout.height - implicitHeight: generalViewLayout.implicitHeight - interactive: contentHeight > height - flickableDirection: Flickable.VerticalFlick ColumnLayout { id: generalViewLayout diff --git a/ui/app/AppLayouts/Profile/panels/TokenSettingsModalContent.qml b/ui/app/AppLayouts/Profile/panels/TokenSettingsModalContent.qml index 2712478be6..b0125b1639 100644 --- a/ui/app/AppLayouts/Profile/panels/TokenSettingsModalContent.qml +++ b/ui/app/AppLayouts/Profile/panels/TokenSettingsModalContent.qml @@ -4,6 +4,7 @@ import QtQuick.Layouts 1.13 import utils 1.0 +import StatusQ.Core 0.1 import StatusQ.Controls 0.1 import StatusQ.Components 0.1 import StatusQ.Popups 0.1 @@ -77,15 +78,11 @@ Item { anchors.left: parent.left } - - ScrollView { + StatusScrollView { id: sview - clip: true ScrollBar.horizontal.policy: ScrollBar.AlwaysOff ScrollBar.vertical.policy: ScrollBar.AlwaysOn - contentHeight: tokenList.height - anchors.top: searchBox.bottom anchors.topMargin: Style.current.smallPadding anchors.left: parent.left diff --git a/ui/app/AppLayouts/Profile/popups/ENSPopup.qml b/ui/app/AppLayouts/Profile/popups/ENSPopup.qml index 93e8b3659c..a33888f958 100644 --- a/ui/app/AppLayouts/Profile/popups/ENSPopup.qml +++ b/ui/app/AppLayouts/Profile/popups/ENSPopup.qml @@ -3,6 +3,8 @@ import QtQuick.Controls 2.3 import QtQuick.Layouts 1.3 import QtQml.Models 2.3 +import StatusQ.Core 0.1 + import utils 1.0 import shared 1.0 import shared.panels 1.0 @@ -43,7 +45,7 @@ ModalPopup { font.weight: Font.Bold } - ScrollView { + StatusScrollView { anchors.fill: parent anchors.top: lbl2.bottom anchors.topMargin: 70 diff --git a/ui/app/AppLayouts/Profile/popups/WakuNodesModal.qml b/ui/app/AppLayouts/Profile/popups/WakuNodesModal.qml index 67e7622bb7..748968ae32 100644 --- a/ui/app/AppLayouts/Profile/popups/WakuNodesModal.qml +++ b/ui/app/AppLayouts/Profile/popups/WakuNodesModal.qml @@ -32,11 +32,9 @@ StatusModal { destroy() } - contentItem: ScrollView { + contentItem: StatusScrollView { height: parent.height width: parent.width - contentHeight: nodesColumn.height - clip: true Column { id: nodesColumn diff --git a/ui/app/AppLayouts/Profile/popups/backupseed/Acknowledgements.qml b/ui/app/AppLayouts/Profile/popups/backupseed/Acknowledgements.qml index 50f5071d85..6b70b97c51 100644 --- a/ui/app/AppLayouts/Profile/popups/backupseed/Acknowledgements.qml +++ b/ui/app/AppLayouts/Profile/popups/backupseed/Acknowledgements.qml @@ -1,12 +1,13 @@ import QtQuick 2.12 import QtQuick.Layouts 1.12 -import StatusQ.Controls 0.1 -import StatusQ.Core.Theme 0.1 - import shared.panels 1.0 import utils 1.0 +import StatusQ.Controls 0.1 +import StatusQ.Core.Theme 0.1 +import StatusQ.Core 0.1 + ColumnLayout { id: root @@ -14,18 +15,14 @@ ColumnLayout { spacing: Style.current.padding - Flickable { + StatusScrollView { id: flick - clip: true - contentHeight: flickLayout.height - interactive: contentHeight > height - flickableDirection: Flickable.VerticalFlick Layout.fillWidth: true Layout.fillHeight: true ColumnLayout { id: flickLayout - width: parent.width + width: flick.availableWidth spacing: Style.current.padding Image { diff --git a/ui/app/AppLayouts/Profile/popups/backupseed/BackupSeedStepBase.qml b/ui/app/AppLayouts/Profile/popups/backupseed/BackupSeedStepBase.qml index 8641b171e4..c2da6ec6cb 100644 --- a/ui/app/AppLayouts/Profile/popups/backupseed/BackupSeedStepBase.qml +++ b/ui/app/AppLayouts/Profile/popups/backupseed/BackupSeedStepBase.qml @@ -2,13 +2,14 @@ import QtQuick 2.12 import QtQuick.Controls 2.12 import QtQuick.Layouts 1.12 +import StatusQ.Core 0.1 import StatusQ.Controls 0.1 import StatusQ.Controls.Validators 0.1 import shared.panels 1.0 import utils 1.0 -Flickable { +StatusScrollView { id: root property int wordRandomNumber: -1 @@ -19,11 +20,7 @@ Flickable { default property alias content: column.children - clip: true - contentHeight: column.height implicitHeight: 520 - interactive: contentHeight > height - flickableDirection: Flickable.VerticalFlick ColumnLayout { id: column diff --git a/ui/app/AppLayouts/Profile/views/EnsListView.qml b/ui/app/AppLayouts/Profile/views/EnsListView.qml index 8c2981f9a6..2d04bf6661 100644 --- a/ui/app/AppLayouts/Profile/views/EnsListView.qml +++ b/ui/app/AppLayouts/Profile/views/EnsListView.qml @@ -193,10 +193,8 @@ Item { height: 200 id: ensList - ScrollView { + StatusScrollView { anchors.fill: parent - Layout.fillWidth: true - Layout.fillHeight: true ScrollBar.horizontal.policy: ScrollBar.AlwaysOff ScrollBar.vertical.policy: lvEns.contentHeight > lvEns.height ? ScrollBar.AlwaysOn : ScrollBar.AlwaysOff diff --git a/ui/app/AppLayouts/Profile/views/EnsTermsAndConditionsView.qml b/ui/app/AppLayouts/Profile/views/EnsTermsAndConditionsView.qml index d4bba9c2a7..61f39883e3 100644 --- a/ui/app/AppLayouts/Profile/views/EnsTermsAndConditionsView.qml +++ b/ui/app/AppLayouts/Profile/views/EnsTermsAndConditionsView.qml @@ -82,12 +82,11 @@ Item { id: popup title: qsTr("Terms of name registration") - ScrollView { + StatusScrollView { ScrollBar.horizontal.policy: ScrollBar.AlwaysOff ScrollBar.vertical.policy: ScrollBar.AlwaysOn width: parent.width height: parent.height - clip: true Column { spacing: Style.current.halfPadding @@ -212,11 +211,9 @@ Item { } } - ScrollView { + StatusScrollView { id: sview - clip: true ScrollBar.horizontal.policy: ScrollBar.AlwaysOff - contentHeight: contentItem.childrenRect.height anchors.top: sectionTitle.bottom anchors.topMargin: Style.current.padding anchors.bottom: startBtn.top diff --git a/ui/app/AppLayouts/Profile/views/EnsWelcomeView.qml b/ui/app/AppLayouts/Profile/views/EnsWelcomeView.qml index 0ea72eaeaf..e5c66fd193 100644 --- a/ui/app/AppLayouts/Profile/views/EnsWelcomeView.qml +++ b/ui/app/AppLayouts/Profile/views/EnsWelcomeView.qml @@ -16,11 +16,9 @@ Item { property string username: "" property int profileContentWidth - ScrollView { + StatusScrollView { id: sview - clip: true ScrollBar.horizontal.policy: ScrollBar.AlwaysOff - contentHeight: contentItem.childrenRect.height anchors.top: parent.top anchors.topMargin: 24 anchors.bottom: startBtn.top diff --git a/ui/app/AppLayouts/Profile/views/LeftTabView.qml b/ui/app/AppLayouts/Profile/views/LeftTabView.qml index 379dec4000..d0b4c0ba3f 100644 --- a/ui/app/AppLayouts/Profile/views/LeftTabView.qml +++ b/ui/app/AppLayouts/Profile/views/LeftTabView.qml @@ -1,10 +1,13 @@ import QtQuick 2.13 import QtQuick.Controls 2.13 -import StatusQ.Components 0.1 -import utils 1.0 +import StatusQ.Core 0.1 +import StatusQ.Components 0.1 + +import utils 1.0 import shared 1.0 import shared.popups 1.0 + import "../panels" Item { @@ -22,7 +25,7 @@ Item { anchors.horizontalCenter: parent.horizontalCenter } - ScrollView { + StatusScrollView { contentWidth: availableWidth contentHeight: profileMenu.height + 24 anchors.right: parent.right @@ -32,7 +35,6 @@ Item { anchors.top: title.bottom anchors.topMargin: Style.current.padding anchors.bottom: parent.bottom - clip: true ScrollBar.horizontal.policy: ScrollBar.AlwaysOff MenuPanel { diff --git a/ui/app/AppLayouts/Profile/views/SettingsContentBase.qml b/ui/app/AppLayouts/Profile/views/SettingsContentBase.qml index f49e8d1da0..88dcb0b8cc 100644 --- a/ui/app/AppLayouts/Profile/views/SettingsContentBase.qml +++ b/ui/app/AppLayouts/Profile/views/SettingsContentBase.qml @@ -99,16 +99,15 @@ Item { } } - ScrollView { + StatusScrollView { id: scrollView anchors.top: titleRow.visible ? titleRow.bottom : topHeader.bottom anchors.bottom: parent.bottom anchors.left: parent.left anchors.topMargin: Style.current.bigPadding width: root.contentWidth - clip: true - Flickable { + StatusScrollView { id: contentFliackable contentWidth: Math.max(contentLayout.implicitWidth, scrollView.width) contentHeight: Math.max(contentLayout.implicitHeight, scrollView.height) + scrollView.anchors.topMargin diff --git a/ui/app/AppLayouts/Wallet/panels/CollectiblesContent.qml b/ui/app/AppLayouts/Wallet/panels/CollectiblesContent.qml index df699f445f..e4b8ba86da 100644 --- a/ui/app/AppLayouts/Wallet/panels/CollectiblesContent.qml +++ b/ui/app/AppLayouts/Wallet/panels/CollectiblesContent.qml @@ -3,12 +3,13 @@ import QtQuick.Controls 2.13 import QtGraphicalEffects 1.13 import QtQml.Models 2.13 +import StatusQ.Core 0.1 +import StatusQ.Controls 0.1 + import utils 1.0 import shared.panels 1.0 -import StatusQ.Controls 0.1 - -ScrollView { +StatusScrollView { id: collectiblesContent readonly property int imageSize: 164 @@ -23,7 +24,6 @@ ScrollView { width: parent.width ScrollBar.vertical.policy: ScrollBar.AlwaysOff ScrollBar.horizontal.policy: ScrollBar.AsNeeded - clip: true Loader { id: contentLoader diff --git a/ui/app/AppLayouts/Wallet/popups/AddAccountModal.qml b/ui/app/AppLayouts/Wallet/popups/AddAccountModal.qml index 25be14d889..7b37767ceb 100644 --- a/ui/app/AppLayouts/Wallet/popups/AddAccountModal.qml +++ b/ui/app/AppLayouts/Wallet/popups/AddAccountModal.qml @@ -152,19 +152,18 @@ StatusModal { } } - contentItem: ScrollView { + contentItem: StatusScrollView { + id: scroll width: root.width - ScrollBar.horizontal.policy: ScrollBar.AlwaysOff topPadding: Style.current.halfPadding bottomPadding: Style.current.halfPadding leftPadding: Style.current.padding rightPadding: Style.current.padding height: Style.dp(400) - clip: true Column { property alias accountNameInput: accountNameInput - width: parent.width + width: scroll.availableWidth spacing: Style.current.halfPadding topPadding: Style.dp(20) diff --git a/ui/app/AppLayouts/Wallet/popups/NetworkSelectPopup.qml b/ui/app/AppLayouts/Wallet/popups/NetworkSelectPopup.qml index ec2cbd80f1..9de7a0607c 100644 --- a/ui/app/AppLayouts/Wallet/popups/NetworkSelectPopup.qml +++ b/ui/app/AppLayouts/Wallet/popups/NetworkSelectPopup.qml @@ -38,14 +38,13 @@ Popup { } } - contentItem: ScrollView { + contentItem: StatusScrollView { id: scrollView contentHeight: content.height width: popup.width height: popup.height ScrollBar.horizontal.policy: ScrollBar.AlwaysOff - clip: true Column { id: content diff --git a/ui/app/AppLayouts/Wallet/views/CollectiblesView.qml b/ui/app/AppLayouts/Wallet/views/CollectiblesView.qml index fdc3933c38..0ef8dd491c 100644 --- a/ui/app/AppLayouts/Wallet/views/CollectiblesView.qml +++ b/ui/app/AppLayouts/Wallet/views/CollectiblesView.qml @@ -2,6 +2,9 @@ import QtQuick 2.13 import QtQuick.Controls 2.13 import QtGraphicalEffects 1.13 +import StatusQ.Core 0.1 +import StatusQ.Components 0.1 + import utils 1.0 import shared 1.0 import shared.panels 1.0 @@ -10,8 +13,6 @@ import "../stores" import "../popups" import "collectibles" -import StatusQ.Components 0.1 - Item { id: root width: parent.width @@ -46,9 +47,8 @@ Item { Component { id: loaded - ScrollView { + StatusScrollView { id: scrollView - clip: true Column { id: collectiblesSection diff --git a/ui/app/AppLayouts/Wallet/views/LeftTabView.qml b/ui/app/AppLayouts/Wallet/views/LeftTabView.qml index d671c318eb..c56fc63d7a 100644 --- a/ui/app/AppLayouts/Wallet/views/LeftTabView.qml +++ b/ui/app/AppLayouts/Wallet/views/LeftTabView.qml @@ -9,6 +9,7 @@ import shared.panels 1.0 import shared.controls 1.0 import StatusQ.Components 0.1 +import StatusQ.Core 0.1 import StatusQ.Core.Theme 0.1 import StatusQ.Controls 0.1 diff --git a/ui/app/AppLayouts/Wallet/views/SavedAddressesView.qml b/ui/app/AppLayouts/Wallet/views/SavedAddressesView.qml index 28b564edfa..38c87460ce 100644 --- a/ui/app/AppLayouts/Wallet/views/SavedAddressesView.qml +++ b/ui/app/AppLayouts/Wallet/views/SavedAddressesView.qml @@ -225,7 +225,7 @@ Item { text: qsTr("No saved addresses") } - ScrollView { + StatusScrollView { anchors.top: errorMessage.bottom anchors.topMargin: Style.current.padding anchors.bottom: parent.bottom @@ -233,14 +233,12 @@ Item { anchors.right: parent.right anchors.left: parent.left visible: listView.count > 0 - ScrollBar.horizontal.policy: ScrollBar.AlwaysOff ListView { id: listView model: RootStore.savedAddresses - clip: true spacing: 5 - anchors.fill: parent + width: parent.width boundsBehavior: Flickable.StopAtBounds delegate: delegateSavedAddress } diff --git a/ui/imports/shared/popups/CommunityIntroDialog.qml b/ui/imports/shared/popups/CommunityIntroDialog.qml index 5d9a3cc926..997330082a 100644 --- a/ui/imports/shared/popups/CommunityIntroDialog.qml +++ b/ui/imports/shared/popups/CommunityIntroDialog.qml @@ -47,7 +47,7 @@ StatusDialog { image.source: root.imageSrc } - ScrollView { + StatusScrollView { Layout.preferredWidth: contentWidth Layout.minimumWidth: 300 @@ -55,18 +55,12 @@ StatusDialog { Layout.preferredHeight: contentHeight Layout.maximumHeight: 400 - contentWidth: messageContent.width - contentHeight: messageContent.height - - clip: true - StatusBaseText { id: messageContent width: Math.min(implicitWidth, 640) text: root.introMessage !== "" ? root.introMessage : qsTr("Community %1 has no intro message...").arg(root.name) - clip: true color: Theme.palette.directColor1 wrapMode: Text.WordWrap } diff --git a/ui/imports/shared/popups/SendModal.qml b/ui/imports/shared/popups/SendModal.qml index 40c7feba00..b2bc46d4c3 100644 --- a/ui/imports/shared/popups/SendModal.qml +++ b/ui/imports/shared/popups/SendModal.qml @@ -260,18 +260,17 @@ StatusModal { source: border } - ScrollView { + StatusScrollView { id: scrollView height: stack.height - assetAndAmmountSelector.height width: parent.width anchors.top: border.bottom anchors.topMargin: Style.current.halfPadding anchors.left: parent.left - + contentHeight: recipientSelector.height + addressSelector.height + networkSelector.height + + fees.height + Style.current.halfPadding ScrollBar.vertical.policy: ScrollBar.AlwaysOff ScrollBar.horizontal.policy: ScrollBar.AlwaysOff - contentHeight: recipientSelector.height + addressSelector.height + networkSelector.height + fees.height + Style.current.halfPadding - clip: true // To-do use standard StatusInput component once the flow for ens name resolution is clear RecipientSelector { diff --git a/ui/imports/shared/status/StatusChatInput.qml b/ui/imports/shared/status/StatusChatInput.qml index b2531fb7ac..1b242d47ad 100644 --- a/ui/imports/shared/status/StatusChatInput.qml +++ b/ui/imports/shared/status/StatusChatInput.qml @@ -16,6 +16,7 @@ import shared.stores 1.0 //TODO remove this dependency import AppLayouts.Chat.panels 1.0 +import StatusQ.Core 0.1 import StatusQ.Core.Theme 0.1 import StatusQ.Core.Utils 0.1 as StatusQUtils import StatusQ.Components 0.1 @@ -928,7 +929,7 @@ Rectangle { visible: control.isStatusUpdateInput } - ScrollView { + StatusScrollView { id: scrollView anchors.top: parent.top anchors.bottom: parent.bottom diff --git a/ui/imports/shared/status/StatusEmojiPopup.qml b/ui/imports/shared/status/StatusEmojiPopup.qml index 8bc9c0ab87..ebbcd94cef 100644 --- a/ui/imports/shared/status/StatusEmojiPopup.qml +++ b/ui/imports/shared/status/StatusEmojiPopup.qml @@ -3,6 +3,7 @@ import QtQuick.Controls 2.13 import QtQuick.Layouts 1.3 import QtGraphicalEffects 1.0 +import StatusQ.Core 0.1 import StatusQ.Controls 0.1 import StatusQ.Components 0.1 import StatusQ.Core.Utils 0.1 as StatusQUtils @@ -279,8 +280,8 @@ Popup { } } - ScrollView { - property ScrollBar vScrollBar: ScrollBar.vertical + StatusScrollView { + readonly property ScrollBar vScrollBar: ScrollBar.vertical property var categrorySectionHeightRatios: [] property int activeCategory: 0 @@ -292,7 +293,6 @@ Popup { Layout.topMargin: Style.current.smallPadding Layout.alignment: Qt.AlignTop | Qt.AlignLeft Layout.preferredHeight: 400 - Style.current.smallPadding - emojiHeader.height - clip: true ScrollBar.vertical.policy: ScrollBar.AlwaysOn ScrollBar.horizontal.policy: ScrollBar.AlwaysOff @@ -332,6 +332,7 @@ Popup { model: popup.categories StatusEmojiSection { + width: scrollView.availableWidth searchString: popup.searchString addEmoji: popup.addEmoji } diff --git a/ui/imports/shared/status/StatusEmojiSection.qml b/ui/imports/shared/status/StatusEmojiSection.qml index 14354ae8ed..fa7ca7cf9e 100644 --- a/ui/imports/shared/status/StatusEmojiSection.qml +++ b/ui/imports/shared/status/StatusEmojiSection.qml @@ -22,9 +22,8 @@ Item { anchors.top: index === 0 ? parent.top : parent.children[index - 1].bottom anchors.topMargin: 0 - width: parent.width // childrenRect caused a binding loop here - height: this.visible ? emojiGrid.height + categoryText.height + noRecentText.height + Style.current.padding : 0 + height: this.visible ? emojiGrid.height + categoryText.height + noRecentText.height + Style.current.padding : 0 StyledText { id: categoryText diff --git a/ui/imports/shared/status/StatusGifPopup.qml b/ui/imports/shared/status/StatusGifPopup.qml index 608be2197a..f6ddc60d86 100644 --- a/ui/imports/shared/status/StatusGifPopup.qml +++ b/ui/imports/shared/status/StatusGifPopup.qml @@ -3,6 +3,7 @@ import QtQuick.Controls 2.13 import QtQuick.Layouts 1.3 import QtGraphicalEffects 1.0 +import StatusQ.Core 0.1 import StatusQ.Components 0.1 import StatusQ.Controls 0.1 @@ -296,10 +297,9 @@ Popup { Component { id: gifItems - ScrollView { + StatusScrollView { id: scrollView property ScrollBar vScrollBar: ScrollBar.vertical - clip: true topPadding: Style.current.smallPadding leftPadding: Style.current.smallPadding rightPadding: Style.current.smallPadding diff --git a/ui/imports/shared/status/StatusStickersPopup.qml b/ui/imports/shared/status/StatusStickersPopup.qml index 925c3d9481..27e1b0292b 100644 --- a/ui/imports/shared/status/StatusStickersPopup.qml +++ b/ui/imports/shared/status/StatusStickersPopup.qml @@ -6,6 +6,7 @@ import QtGraphicalEffects 1.0 import utils 1.0 import shared.panels 1.0 +import StatusQ.Core 0.1 import StatusQ.Controls 0.1 as StatusQControls import StatusQ.Components 0.1 //TODO improve this! @@ -228,12 +229,11 @@ Popup { } } - ScrollView { + StatusScrollView { id: installedStickersSV anchors.bottom: parent.bottom height: 32 - clip: true - ScrollBar.vertical.policy: ScrollBar.AlwaysOff + ScrollBar.vertical.policy: ScrollBar.AlwaysOff RowLayout { id: stickersRowLayout diff --git a/ui/imports/shared/views/AssetsView.qml b/ui/imports/shared/views/AssetsView.qml index 1cd7fe8a2b..1d988e60b7 100644 --- a/ui/imports/shared/views/AssetsView.qml +++ b/ui/imports/shared/views/AssetsView.qml @@ -2,6 +2,8 @@ import QtQuick 2.13 import QtQuick.Layouts 1.3 import QtQuick.Controls 2.14 +import StatusQ.Core 0.1 + import utils 1.0 import shared 1.0 @@ -13,7 +15,7 @@ Item { height: assetListView.height - ScrollView { + StatusScrollView { anchors.fill: parent Layout.fillWidth: true Layout.fillHeight: true diff --git a/ui/imports/shared/views/ExistingContacts.qml b/ui/imports/shared/views/ExistingContacts.qml index b66254ed16..a68b0d3f1d 100644 --- a/ui/imports/shared/views/ExistingContacts.qml +++ b/ui/imports/shared/views/ExistingContacts.qml @@ -2,6 +2,8 @@ import QtQuick 2.13 import QtQuick.Controls 2.13 import QtQuick.Layouts 1.13 +import StatusQ.Core 0.1 + import utils 1.0 import shared.status 1.0 import shared.stores 1.0 @@ -30,7 +32,7 @@ Item { } - ScrollView { + StatusScrollView { anchors.fill: parent ScrollBar.horizontal.policy: ScrollBar.AlwaysOff diff --git a/ui/imports/shared/views/NetworkSelector.qml b/ui/imports/shared/views/NetworkSelector.qml index ddd1970e93..9d3253396d 100644 --- a/ui/imports/shared/views/NetworkSelector.qml +++ b/ui/imports/shared/views/NetworkSelector.qml @@ -14,7 +14,7 @@ import "../controls" Item { id: root - height: visible ? tabBar.height + stackLayout.height + 2* Style.current.xlPadding : 0 + implicitHeight: visible ? tabBar.height + stackLayout.height + 2* Style.current.xlPadding : 0 property var store property var suggestedRoutes @@ -123,4 +123,4 @@ Item { } } } -} +} \ No newline at end of file diff --git a/ui/imports/shared/views/TransactionPreview.qml b/ui/imports/shared/views/TransactionPreview.qml index 367bdf81d1..4e95e88d93 100644 --- a/ui/imports/shared/views/TransactionPreview.qml +++ b/ui/imports/shared/views/TransactionPreview.qml @@ -3,6 +3,7 @@ import QtQuick.Controls 2.13 import QtQuick.Layouts 1.13 import QtGraphicalEffects 1.13 +import StatusQ.Core 0.1 import StatusQ.Controls 0.1 as StatusQ import StatusQ.Components 0.1 @@ -535,7 +536,7 @@ Item { anchors.fill: parent anchors.leftMargin: 0 anchors.rightMargin: 0 - ScrollView { + StatusScrollView { width: parent.width height: 150 TextArea {