mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-15 02:37:49 -06:00
Plugin browser can now download & install plugins
This commit is contained in:
parent
217eecccb9
commit
e3dffd6610
2 changed files with 64 additions and 16 deletions
|
@ -11,25 +11,48 @@ UM.Dialog
|
|||
title: "YAY"
|
||||
width: 450
|
||||
height: 150
|
||||
ListView
|
||||
ScrollView
|
||||
{
|
||||
model: manager.pluginsModel
|
||||
anchors.fill: parent
|
||||
delegate: Row
|
||||
frameVisible: true
|
||||
ListView
|
||||
{
|
||||
width: parent.width
|
||||
Button
|
||||
{
|
||||
text: model.name
|
||||
}
|
||||
Button
|
||||
{
|
||||
text: model.author
|
||||
}
|
||||
id: pluginList
|
||||
model: manager.pluginsModel
|
||||
anchors.fill: parent
|
||||
|
||||
Label
|
||||
delegate: pluginDelegate
|
||||
}
|
||||
}
|
||||
Item
|
||||
{
|
||||
SystemPalette { id: palette }
|
||||
Component
|
||||
{
|
||||
id: pluginDelegate
|
||||
Rectangle
|
||||
{
|
||||
text: model.short_description
|
||||
width: pluginList.width;
|
||||
height: childrenRect.height;
|
||||
color: index % 2 ? palette.base : palette.alternateBase
|
||||
Row
|
||||
{
|
||||
width: parent.width
|
||||
height: childrenRect.height;
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: UM.Theme.getSize("default_margin").width
|
||||
Label
|
||||
{
|
||||
|
||||
text: model.name
|
||||
width: contentWidth
|
||||
}
|
||||
Button
|
||||
{
|
||||
text: "Download"
|
||||
onClicked: manager.downloadAndInstallPlugin(model.file_location)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue