mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-20 14:39:10 +08:00
PluginBrowser strings are now translatable
CURA-3856
This commit is contained in:
parent
f5a43b48c2
commit
867dd04681
@ -8,67 +8,81 @@ UM.Dialog
|
|||||||
{
|
{
|
||||||
id: base
|
id: base
|
||||||
|
|
||||||
title: "Find & Update plugins"
|
title: catalog.i18nc("@title:window", "Find & Update plugins")
|
||||||
width: 450
|
width: 450
|
||||||
height: 450
|
height: 450
|
||||||
ScrollView
|
|
||||||
{
|
|
||||||
width: parent.width
|
|
||||||
height: parent.height - progressbar.height - UM.Theme.getSize("default_margin").height
|
|
||||||
frameVisible: true
|
|
||||||
ListView
|
|
||||||
{
|
|
||||||
id: pluginList
|
|
||||||
model: manager.pluginsModel
|
|
||||||
anchors.fill: parent
|
|
||||||
|
|
||||||
delegate: pluginDelegate
|
|
||||||
}
|
|
||||||
}
|
|
||||||
ProgressBar
|
|
||||||
{
|
|
||||||
id: progressbar
|
|
||||||
anchors.bottom: parent.bottom
|
|
||||||
style: UM.Theme.styles.progressbar
|
|
||||||
minimumValue: 0;
|
|
||||||
maximumValue: 100
|
|
||||||
width: parent.width
|
|
||||||
height: 20
|
|
||||||
value: manager.downloadProgress
|
|
||||||
}
|
|
||||||
|
|
||||||
Item
|
Item
|
||||||
{
|
{
|
||||||
SystemPalette { id: palette }
|
anchors.fill: parent
|
||||||
Component
|
Label
|
||||||
{
|
{
|
||||||
id: pluginDelegate
|
id: introText
|
||||||
Rectangle
|
text: catalog.i18nc("@label", "Here you can find a list of Third Party plugins.")
|
||||||
|
width: parent.width
|
||||||
|
height: 30
|
||||||
|
}
|
||||||
|
ScrollView
|
||||||
|
{
|
||||||
|
width: parent.width
|
||||||
|
anchors.top: introText.bottom
|
||||||
|
anchors.bottom: progressbar.top
|
||||||
|
anchors.bottomMargin: UM.Theme.getSize("default_margin").height
|
||||||
|
frameVisible: true
|
||||||
|
ListView
|
||||||
{
|
{
|
||||||
width: pluginList.width;
|
id: pluginList
|
||||||
height: childrenRect.height;
|
model: manager.pluginsModel
|
||||||
color: index % 2 ? palette.base : palette.alternateBase
|
anchors.fill: parent
|
||||||
Row
|
|
||||||
|
delegate: pluginDelegate
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ProgressBar
|
||||||
|
{
|
||||||
|
id: progressbar
|
||||||
|
anchors.bottom: parent.bottom
|
||||||
|
style: UM.Theme.styles.progressbar
|
||||||
|
minimumValue: 0;
|
||||||
|
maximumValue: 100
|
||||||
|
width: parent.width
|
||||||
|
height: 20
|
||||||
|
value: manager.downloadProgress
|
||||||
|
}
|
||||||
|
|
||||||
|
Item
|
||||||
|
{
|
||||||
|
SystemPalette { id: palette }
|
||||||
|
Component
|
||||||
|
{
|
||||||
|
id: pluginDelegate
|
||||||
|
Rectangle
|
||||||
{
|
{
|
||||||
width: childrenRect.width
|
width: pluginList.width;
|
||||||
height: childrenRect.height;
|
height: childrenRect.height;
|
||||||
anchors.left: parent.left
|
color: index % 2 ? palette.base : palette.alternateBase
|
||||||
anchors.leftMargin: UM.Theme.getSize("default_margin").width
|
Row
|
||||||
Label
|
|
||||||
{
|
{
|
||||||
text: model.name
|
width: childrenRect.width
|
||||||
width: contentWidth
|
height: childrenRect.height;
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.leftMargin: UM.Theme.getSize("default_margin").width
|
||||||
|
Label
|
||||||
|
{
|
||||||
|
text: model.name
|
||||||
|
width: contentWidth
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Button
|
||||||
|
{
|
||||||
|
text: !model.already_installed ? catalog.i18nc("@action:button", "Download") : model.can_upgrade ? catalog.i18nc("@action:button", "Upgrade") : catalog.i18nc("@action:button", "Download")
|
||||||
|
onClicked: manager.downloadAndInstallPlugin(model.file_location)
|
||||||
|
anchors.right: parent.right
|
||||||
|
enabled: (!model.already_installed || model.can_upgrade) && !manager.isDownloading
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Button
|
|
||||||
{
|
|
||||||
text: !model.already_installed ? "Download" : model.can_upgrade ? "Upgrade" : "Download"
|
|
||||||
onClicked: manager.downloadAndInstallPlugin(model.file_location)
|
|
||||||
anchors.right: parent.right
|
|
||||||
enabled: (!model.already_installed || model.can_upgrade) && !manager.isDownloading
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
UM.I18nCatalog { id: catalog; name:"cura" }
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user