From 0d85b2be7f1df479b2619000732febcb0f3db0b7 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Tue, 22 Feb 2022 16:07:11 +0100 Subject: Ensure that scrollbar is centered CURA-8762 --- plugins/Marketplace/resources/qml/Packages.qml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'plugins/Marketplace/resources') diff --git a/plugins/Marketplace/resources/qml/Packages.qml b/plugins/Marketplace/resources/qml/Packages.qml index 194c90c248..17fa884ad7 100644 --- a/plugins/Marketplace/resources/qml/Packages.qml +++ b/plugins/Marketplace/resources/qml/Packages.qml @@ -53,8 +53,8 @@ ListView // Vertical ScrollBar, styled similarly to the scrollBar in the settings panel id: verticalScrollBar visible: packages.contentHeight > packages.height - - background: Item{} + anchors.right: parent.right + background: Item {} contentItem: Rectangle { @@ -83,7 +83,16 @@ ListView { manageableInListView: packages.packagesManageableInListView packageData: model.package - width: parent.width - UM.Theme.getSize("default_margin").width - UM.Theme.getSize("narrow_margin").width + width: { + if(verticalScrollBar.visible) + { + return parent.width - UM.Theme.getSize("default_margin").width - UM.Theme.getSize("default_margin").width + } + else + { + return parent.width - UM.Theme.getSize("default_margin").width + } + } color: cardMouseArea.containsMouse ? UM.Theme.getColor("action_button_hovered") : UM.Theme.getColor("main_background") } } -- cgit v1.2.3