mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-24 15:13:56 -06:00
Merge branch 'master' into fix_toolbox_appearance
# Conflicts: # plugins/Toolbox/resources/qml/ToolboxDetailPage.qml
This commit is contained in:
commit
0aadaa3c9d
11 changed files with 179 additions and 90 deletions
108
plugins/Toolbox/resources/qml/ToolboxCompatibilityChart.qml
Normal file
108
plugins/Toolbox/resources/qml/ToolboxCompatibilityChart.qml
Normal file
|
@ -0,0 +1,108 @@
|
|||
// Copyright (c) 2018 Ultimaker B.V.
|
||||
// Toolbox is released under the terms of the LGPLv3 or higher.
|
||||
|
||||
import QtQuick 2.2
|
||||
import QtQuick.Controls 1.4
|
||||
import QtQuick.Controls.Styles 1.4
|
||||
import UM 1.1 as UM
|
||||
|
||||
Item
|
||||
{
|
||||
anchors.topMargin: UM.Theme.getSize("default_margin").height
|
||||
height: visible ? childrenRect.height : 0
|
||||
visible: packageData.type == "material" && packageData.has_configs
|
||||
Label
|
||||
{
|
||||
id: heading
|
||||
anchors.topMargin: UM.Theme.getSize("default_margin").height
|
||||
width: parent.width
|
||||
text: catalog.i18nc("@label", "Compatibility")
|
||||
wrapMode: Text.WordWrap
|
||||
color: UM.Theme.getColor("text_medium")
|
||||
font: UM.Theme.getFont("medium")
|
||||
}
|
||||
TableView
|
||||
{
|
||||
id: table
|
||||
anchors.top: heading.bottom
|
||||
anchors.topMargin: UM.Theme.getSize("default_margin").height
|
||||
width: parent.width
|
||||
frameVisible: false
|
||||
selectionMode: 0
|
||||
model: packageData.supported_configs
|
||||
headerDelegate: Item
|
||||
{
|
||||
height: UM.Theme.getSize("toolbox_chart_row").height
|
||||
Label
|
||||
{
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
elide: styleData.elideMode
|
||||
text: styleData.value
|
||||
color: UM.Theme.getColor("text")
|
||||
font: UM.Theme.getFont("default_bold")
|
||||
}
|
||||
Rectangle
|
||||
{
|
||||
anchors.bottom: parent.bottom
|
||||
height: UM.Theme.getSize("default_lining").height
|
||||
width: parent.width
|
||||
color: "black"
|
||||
}
|
||||
}
|
||||
rowDelegate: Item
|
||||
{
|
||||
height: UM.Theme.getSize("toolbox_chart_row").height
|
||||
Label
|
||||
{
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
elide: styleData.elideMode
|
||||
text: styleData.value
|
||||
color: UM.Theme.getColor("text_medium")
|
||||
font: UM.Theme.getFont("default")
|
||||
}
|
||||
}
|
||||
itemDelegate: Item
|
||||
{
|
||||
height: UM.Theme.getSize("toolbox_chart_row").height
|
||||
Label
|
||||
{
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
elide: styleData.elideMode
|
||||
text: styleData.value
|
||||
color: UM.Theme.getColor("text_medium")
|
||||
font: UM.Theme.getFont("default")
|
||||
}
|
||||
}
|
||||
|
||||
TableViewColumn
|
||||
{
|
||||
role: "machine"
|
||||
title: "Machine"
|
||||
width: Math.floor(table.width * 0.25)
|
||||
}
|
||||
TableViewColumn
|
||||
{
|
||||
role: "print_core"
|
||||
title: "Print Core"
|
||||
width: Math.floor(table.width * 0.2)
|
||||
}
|
||||
TableViewColumn
|
||||
{
|
||||
role: "build_plate"
|
||||
title: "Build Plate"
|
||||
width: Math.floor(table.width * 0.225)
|
||||
}
|
||||
TableViewColumn
|
||||
{
|
||||
role: "support_material"
|
||||
title: "Support"
|
||||
width: Math.floor(table.width * 0.225)
|
||||
}
|
||||
TableViewColumn
|
||||
{
|
||||
role: "quality"
|
||||
title: "Quality"
|
||||
width: Math.floor(table.width * 0.1)
|
||||
}
|
||||
}
|
||||
}
|
|
@ -106,7 +106,7 @@ Item
|
|||
spacing: Math.floor(UM.Theme.getSize("narrow_margin").height)
|
||||
Label
|
||||
{
|
||||
text: details.version || ""
|
||||
text: details.version || catalog.i18nc("@label", "Unknown")
|
||||
font: UM.Theme.getFont("very_small")
|
||||
color: UM.Theme.getColor("text")
|
||||
}
|
||||
|
|
|
@ -10,6 +10,7 @@ Item
|
|||
{
|
||||
id: tile
|
||||
property bool installed: toolbox.isInstalled(model.id)
|
||||
property var packageData: model
|
||||
width: detailList.width - UM.Theme.getSize("wide_margin").width
|
||||
height: normalData.height + supportedConfigsChart.height + 3 * UM.Theme.getSize("default_margin").height
|
||||
Item
|
||||
|
@ -158,76 +159,11 @@ Item
|
|||
}
|
||||
}
|
||||
|
||||
Item
|
||||
ToolboxCompatibilityChart
|
||||
{
|
||||
id: supportedConfigsChart
|
||||
id: compatibilityChart
|
||||
anchors.top: normalData.bottom
|
||||
anchors.topMargin: UM.Theme.getSize("default_margin").height
|
||||
height: visible ? childrenRect.height : 0
|
||||
width: normalData.width
|
||||
visible: model.type == "material" && model.supported_configs.length > 0
|
||||
Label
|
||||
{
|
||||
id: compatibilityHeading
|
||||
anchors.topMargin: UM.Theme.getSize("default_margin").height
|
||||
width: parent.width
|
||||
text: catalog.i18nc("@label", "Compatibility")
|
||||
wrapMode: Text.WordWrap
|
||||
color: UM.Theme.getColor("text_medium")
|
||||
font: UM.Theme.getFont("default")
|
||||
}
|
||||
Column
|
||||
{
|
||||
id: compatibilityLabels
|
||||
anchors
|
||||
{
|
||||
top: compatibilityHeading.bottom
|
||||
topMargin: UM.Theme.getSize("default_margin").height
|
||||
bottomMargin: UM.Theme.getSize("default_margin").height
|
||||
}
|
||||
width: childrenRect.width
|
||||
Label
|
||||
{
|
||||
text: catalog.i18nc("@label", "Machines") + ":"
|
||||
font: UM.Theme.getFont("small")
|
||||
}
|
||||
Label
|
||||
{
|
||||
text: catalog.i18nc("@label", "Print Cores") + ":"
|
||||
font: UM.Theme.getFont("small")
|
||||
}
|
||||
Label
|
||||
{
|
||||
text: catalog.i18nc("@label", "Quality Profiles") + ":"
|
||||
font: UM.Theme.getFont("small")
|
||||
}
|
||||
}
|
||||
Column
|
||||
{
|
||||
id: compatibilityValues
|
||||
anchors
|
||||
{
|
||||
left: compatibilityLabels.right
|
||||
leftMargin: UM.Theme.getSize("default_margin").height
|
||||
top: compatibilityLabels.top
|
||||
bottom: compatibilityLabels.bottom
|
||||
}
|
||||
Label
|
||||
{
|
||||
text: "Thingy"
|
||||
font: UM.Theme.getFont("very_small")
|
||||
}
|
||||
Label
|
||||
{
|
||||
text: "Thingy"
|
||||
font: UM.Theme.getFont("very_small")
|
||||
}
|
||||
Label
|
||||
{
|
||||
text: "Thingy"
|
||||
font: UM.Theme.getFont("very_small")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle
|
||||
|
@ -235,7 +171,7 @@ Item
|
|||
color: UM.Theme.getColor("lining")
|
||||
width: tile.width
|
||||
height: UM.Theme.getSize("default_lining").height
|
||||
anchors.top: supportedConfigsChart.bottom
|
||||
anchors.top: compatibilityChart.bottom
|
||||
anchors.topMargin: UM.Theme.getSize("default_margin").height + UM.Theme.getSize("wide_margin").height //Normal margin for spacing after chart, wide margin between items.
|
||||
}
|
||||
Connections
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue