mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-13 20:55:59 +08:00
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:
parent
97d20b4242
commit
11e9a4cdf4
@ -73,22 +73,26 @@ UM.Dialog
|
|||||||
anchors.topMargin: UM.Theme.getSize("default_margin").height
|
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
|
ListView
|
||||||
{
|
{
|
||||||
id: projectsList
|
id: projectsList
|
||||||
|
|
||||||
anchors.top: creditsNotes.bottom
|
|
||||||
anchors.topMargin: 10
|
|
||||||
|
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: childrenRect.height
|
|
||||||
|
|
||||||
delegate: Row
|
delegate: Row
|
||||||
{
|
{
|
||||||
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)
|
||||||
width: projectsList.width * 0.25
|
width: (projectsList.width * 0.25) | 0
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
onLinkActivated: Qt.openUrlExternally(link)
|
onLinkActivated: Qt.openUrlExternally(link)
|
||||||
}
|
}
|
||||||
@ -96,13 +100,13 @@ UM.Dialog
|
|||||||
{
|
{
|
||||||
text: model.description
|
text: model.description
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
width: projectsList.width * 0.6
|
width: (projectsList.width * 0.6) | 0
|
||||||
}
|
}
|
||||||
Label
|
Label
|
||||||
{
|
{
|
||||||
text: model.license
|
text: model.license
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
width: projectsList.width * 0.15
|
width: (projectsList.width * 0.15) | 0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
model: ListModel
|
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" });
|
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
|
rightButtons: Button
|
||||||
{
|
{
|
||||||
//: Close about dialog button
|
//: Close about dialog button
|
||||||
|
id: closeButton
|
||||||
text: catalog.i18nc("@action:button","Close");
|
text: catalog.i18nc("@action:button","Close");
|
||||||
|
|
||||||
onClicked: base.visible = false;
|
onClicked: base.visible = false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user