mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-03 12:03:57 -06:00
Move all the seperate tiles into loaders instead of the entire page
Otherwise the details selection didn't work anymore and I didn't want to add more hacks. CURA-6006
This commit is contained in:
parent
54def4edee
commit
a77ad32999
4 changed files with 33 additions and 15 deletions
|
@ -26,10 +26,15 @@ Item
|
||||||
}
|
}
|
||||||
height: childrenRect.height + 2 * UM.Theme.getSize("wide_margin").height
|
height: childrenRect.height + 2 * UM.Theme.getSize("wide_margin").height
|
||||||
spacing: UM.Theme.getSize("default_margin").height
|
spacing: UM.Theme.getSize("default_margin").height
|
||||||
|
|
||||||
Repeater
|
Repeater
|
||||||
{
|
{
|
||||||
model: toolbox.packagesModel
|
model: toolbox.packagesModel
|
||||||
delegate: ToolboxDetailTile {}
|
delegate: Loader
|
||||||
|
{
|
||||||
|
asynchronous: true
|
||||||
|
source: "ToolboxDetailTile.qml"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,7 +24,7 @@ Column
|
||||||
color: UM.Theme.getColor("text_medium")
|
color: UM.Theme.getColor("text_medium")
|
||||||
font: UM.Theme.getFont("medium")
|
font: UM.Theme.getFont("medium")
|
||||||
}
|
}
|
||||||
GridLayout
|
Grid
|
||||||
{
|
{
|
||||||
id: grid
|
id: grid
|
||||||
width: parent.width - 2 * parent.padding
|
width: parent.width - 2 * parent.padding
|
||||||
|
@ -34,10 +34,12 @@ Column
|
||||||
Repeater
|
Repeater
|
||||||
{
|
{
|
||||||
model: gridArea.model
|
model: gridArea.model
|
||||||
delegate: ToolboxDownloadsGridTile
|
delegate: Loader
|
||||||
{
|
{
|
||||||
Layout.preferredWidth: (grid.width - (grid.columns - 1) * grid.columnSpacing) / grid.columns
|
asynchronous: true
|
||||||
Layout.preferredHeight: UM.Theme.getSize("toolbox_thumbnail_small").height
|
width: (grid.width - (grid.columns - 1) * grid.columnSpacing) / grid.columns
|
||||||
|
height: UM.Theme.getSize("toolbox_thumbnail_small").height
|
||||||
|
source: "ToolboxDownloadsGridTile.qml"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,23 +30,26 @@ Rectangle
|
||||||
height: childrenRect.height
|
height: childrenRect.height
|
||||||
spacing: UM.Theme.getSize("wide_margin").width
|
spacing: UM.Theme.getSize("wide_margin").width
|
||||||
columns: 3
|
columns: 3
|
||||||
anchors
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
{
|
|
||||||
horizontalCenter: parent.horizontalCenter
|
|
||||||
}
|
|
||||||
Repeater
|
Repeater
|
||||||
{
|
{
|
||||||
model: {
|
model:
|
||||||
if ( toolbox.viewCategory == "plugin" )
|
{
|
||||||
|
if (toolbox.viewCategory == "plugin")
|
||||||
{
|
{
|
||||||
return toolbox.pluginsShowcaseModel
|
return toolbox.pluginsShowcaseModel
|
||||||
}
|
}
|
||||||
if ( toolbox.viewCategory == "material" )
|
if (toolbox.viewCategory == "material")
|
||||||
{
|
{
|
||||||
return toolbox.materialsShowcaseModel
|
return toolbox.materialsShowcaseModel
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
delegate: ToolboxDownloadsShowcaseTile {}
|
delegate: Loader
|
||||||
|
{
|
||||||
|
asynchronous: true
|
||||||
|
source: "ToolboxDownloadsShowcaseTile.qml"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -64,7 +64,11 @@ ScrollView
|
||||||
{
|
{
|
||||||
id: materialList
|
id: materialList
|
||||||
model: toolbox.pluginsInstalledModel
|
model: toolbox.pluginsInstalledModel
|
||||||
delegate: ToolboxInstalledTile {}
|
delegate: Loader
|
||||||
|
{
|
||||||
|
asynchronous: true
|
||||||
|
source: "ToolboxInstalledTile.qml"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -101,7 +105,11 @@ ScrollView
|
||||||
{
|
{
|
||||||
id: pluginList
|
id: pluginList
|
||||||
model: toolbox.materialsInstalledModel
|
model: toolbox.materialsInstalledModel
|
||||||
delegate: ToolboxInstalledTile {}
|
delegate: Loader
|
||||||
|
{
|
||||||
|
asynchronous: true
|
||||||
|
source: "ToolboxInstalledTile.qml"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue