Make About window scrollable

On some OSes/configurations/screens, the list of credits in the About window doesn't fit until the window is resized. Adding a scrollview helps in these cases.
This commit is contained in:
fieldOfView 2017-02-17 13:41:39 +01:00
parent 97d20b4242
commit 11e9a4cdf4

View File

@ -73,22 +73,26 @@ UM.Dialog
anchors.topMargin: UM.Theme.getSize("default_margin").height
}
ScrollView
{
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)
ListView
{
id: projectsList
anchors.top: creditsNotes.bottom
anchors.topMargin: 10
width: parent.width
height: childrenRect.height
delegate: Row
{
Label
{
text: "<a href='%1' title='%2'>%2</a>".arg(model.url).arg(model.name)
width: projectsList.width * 0.25
width: (projectsList.width * 0.25) | 0
elide: Text.ElideRight
onLinkActivated: Qt.openUrlExternally(link)
}
@ -96,13 +100,13 @@ UM.Dialog
{
text: model.description
elide: Text.ElideRight
width: projectsList.width * 0.6
width: (projectsList.width * 0.6) | 0
}
Label
{
text: model.license
elide: Text.ElideRight
width: projectsList.width * 0.15
width: (projectsList.width * 0.15) | 0
}
}
model: ListModel
@ -131,10 +135,12 @@ UM.Dialog
projectsModel.append({ name:"Font-Awesome-SVG-PNG", description: catalog.i18nc("@label", "SVG icons"), license: "SIL OFL 1.1", url: "https://github.com/encharm/Font-Awesome-SVG-PNG" });
}
}
}
rightButtons: Button
{
//: Close about dialog button
id: closeButton
text: catalog.i18nc("@action:button","Close");
onClicked: base.visible = false;