Use styled scroll bar, and no ScrollView

Make sure the text aligns next to the scrollbar instead of behind it, too.

Contributes to issue CURA-8686.
This commit is contained in:
Ghostkeeper 2022-01-18 17:51:37 +01:00
parent 85d0749f5f
commit c605b45b7c
No known key found for this signature in database
GPG key ID: D2A8871EE34EC59A

View file

@ -5,7 +5,7 @@ import QtQuick 2.2
import QtQuick.Controls 2.9
import QtQuick.Window 2.1
import UM 1.1 as UM
import UM 1.5 as UM
UM.Dialog
{
@ -89,23 +89,22 @@ UM.Dialog
anchors.topMargin: UM.Theme.getSize("default_margin").height
}
ScrollView
{
id: credits
anchors.top: creditsNotes.bottom
anchors.topMargin: UM.Theme.getSize("default_margin").height
width: parent.width
height: base.height - y - (2 * UM.Theme.getSize("default_margin").height + closeButton.height)
ScrollBar.horizontal.policy: ScrollBar.AlwaysOff
ListView
{
id: projectsList
anchors.top: creditsNotes.bottom
anchors.topMargin: UM.Theme.getSize("default_margin").height
width: parent.width
height: base.height - y - (2 * UM.Theme.getSize("default_margin").height + closeButton.height)
ScrollBar.vertical: UM.ScrollBar
{
id: projectsListScrollBar
}
delegate: Row
{
spacing: UM.Theme.getSize("narrow_margin").width
Label
{
text: "<a href='%1' title='%2'>%2</a>".arg(model.url).arg(model.name)
@ -117,7 +116,7 @@ UM.Dialog
{
text: model.description
elide: Text.ElideRight
width: (projectsList.width * 0.6) | 0
width: ((projectsList.width * 0.6) | 0) - parent.spacing * 2 - projectsListScrollBar.width
}
Label
{
@ -165,7 +164,6 @@ UM.Dialog
projectsModel.append({ name: "AppImageKit", description: catalog.i18nc("@label", "Linux cross-distribution application deployment"), license: "MIT", url: "https://github.com/AppImage/AppImageKit" });
}
}
}
rightButtons: Button
{