mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 08:36:04 +08:00
Ensure that scrollbar is centered
CURA-8762
This commit is contained in:
parent
a36fedabe5
commit
0d85b2be7f
@ -53,8 +53,8 @@ ListView
|
|||||||
// Vertical ScrollBar, styled similarly to the scrollBar in the settings panel
|
// Vertical ScrollBar, styled similarly to the scrollBar in the settings panel
|
||||||
id: verticalScrollBar
|
id: verticalScrollBar
|
||||||
visible: packages.contentHeight > packages.height
|
visible: packages.contentHeight > packages.height
|
||||||
|
anchors.right: parent.right
|
||||||
background: Item{}
|
background: Item {}
|
||||||
|
|
||||||
contentItem: Rectangle
|
contentItem: Rectangle
|
||||||
{
|
{
|
||||||
@ -83,7 +83,16 @@ ListView
|
|||||||
{
|
{
|
||||||
manageableInListView: packages.packagesManageableInListView
|
manageableInListView: packages.packagesManageableInListView
|
||||||
packageData: model.package
|
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")
|
color: cardMouseArea.containsMouse ? UM.Theme.getColor("action_button_hovered") : UM.Theme.getColor("main_background")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user