mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-14 10:17:52 -06:00
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:
parent
85d0749f5f
commit
c605b45b7c
1 changed files with 66 additions and 68 deletions
|
@ -5,7 +5,7 @@ import QtQuick 2.2
|
||||||
import QtQuick.Controls 2.9
|
import QtQuick.Controls 2.9
|
||||||
import QtQuick.Window 2.1
|
import QtQuick.Window 2.1
|
||||||
|
|
||||||
import UM 1.1 as UM
|
import UM 1.5 as UM
|
||||||
|
|
||||||
UM.Dialog
|
UM.Dialog
|
||||||
{
|
{
|
||||||
|
@ -89,23 +89,22 @@ UM.Dialog
|
||||||
anchors.topMargin: UM.Theme.getSize("default_margin").height
|
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
|
ListView
|
||||||
{
|
{
|
||||||
id: projectsList
|
id: projectsList
|
||||||
|
anchors.top: creditsNotes.bottom
|
||||||
|
anchors.topMargin: UM.Theme.getSize("default_margin").height
|
||||||
width: parent.width
|
width: parent.width
|
||||||
|
height: base.height - y - (2 * UM.Theme.getSize("default_margin").height + closeButton.height)
|
||||||
|
|
||||||
|
ScrollBar.vertical: UM.ScrollBar
|
||||||
|
{
|
||||||
|
id: projectsListScrollBar
|
||||||
|
}
|
||||||
|
|
||||||
delegate: Row
|
delegate: Row
|
||||||
{
|
{
|
||||||
|
spacing: UM.Theme.getSize("narrow_margin").width
|
||||||
Label
|
Label
|
||||||
{
|
{
|
||||||
text: "<a href='%1' title='%2'>%2</a>".arg(model.url).arg(model.name)
|
text: "<a href='%1' title='%2'>%2</a>".arg(model.url).arg(model.name)
|
||||||
|
@ -117,7 +116,7 @@ UM.Dialog
|
||||||
{
|
{
|
||||||
text: model.description
|
text: model.description
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
width: (projectsList.width * 0.6) | 0
|
width: ((projectsList.width * 0.6) | 0) - parent.spacing * 2 - projectsListScrollBar.width
|
||||||
}
|
}
|
||||||
Label
|
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" });
|
projectsModel.append({ name: "AppImageKit", description: catalog.i18nc("@label", "Linux cross-distribution application deployment"), license: "MIT", url: "https://github.com/AppImage/AppImageKit" });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
rightButtons: Button
|
rightButtons: Button
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue