mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-24 15:13:56 -06:00
Merge branch 'fixes_toolbox' of github.com:Ultimaker/Cura
This commit is contained in:
commit
e630cb3480
10 changed files with 124 additions and 163 deletions
|
@ -48,32 +48,32 @@ Window
|
||||||
ToolboxLoadingPage
|
ToolboxLoadingPage
|
||||||
{
|
{
|
||||||
id: viewLoading
|
id: viewLoading
|
||||||
visible: toolbox.viewCategory != "installed" && toolbox.viewPage == "loading"
|
visible: toolbox.viewCategory !== "installed" && toolbox.viewPage === "loading"
|
||||||
}
|
}
|
||||||
ToolboxErrorPage
|
ToolboxErrorPage
|
||||||
{
|
{
|
||||||
id: viewErrored
|
id: viewErrored
|
||||||
visible: toolbox.viewCategory != "installed" && toolbox.viewPage == "errored"
|
visible: toolbox.viewCategory !== "installed" && toolbox.viewPage === "errored"
|
||||||
}
|
}
|
||||||
ToolboxDownloadsPage
|
ToolboxDownloadsPage
|
||||||
{
|
{
|
||||||
id: viewDownloads
|
id: viewDownloads
|
||||||
visible: toolbox.viewCategory != "installed" && toolbox.viewPage == "overview"
|
visible: toolbox.viewCategory !== "installed" && toolbox.viewPage === "overview"
|
||||||
}
|
}
|
||||||
ToolboxDetailPage
|
ToolboxDetailPage
|
||||||
{
|
{
|
||||||
id: viewDetail
|
id: viewDetail
|
||||||
visible: toolbox.viewCategory != "installed" && toolbox.viewPage == "detail"
|
visible: toolbox.viewCategory !== "installed" && toolbox.viewPage === "detail"
|
||||||
}
|
}
|
||||||
ToolboxAuthorPage
|
ToolboxAuthorPage
|
||||||
{
|
{
|
||||||
id: viewAuthor
|
id: viewAuthor
|
||||||
visible: toolbox.viewCategory != "installed" && toolbox.viewPage == "author"
|
visible: toolbox.viewCategory !== "installed" && toolbox.viewPage === "author"
|
||||||
}
|
}
|
||||||
ToolboxInstalledPage
|
ToolboxInstalledPage
|
||||||
{
|
{
|
||||||
id: installedPluginList
|
id: installedPluginList
|
||||||
visible: toolbox.viewCategory == "installed"
|
visible: toolbox.viewCategory === "installed"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
// Copyright (c) 2018 Ultimaker B.V.
|
// Copyright (c) 2019 Ultimaker B.V.
|
||||||
// Toolbox is released under the terms of the LGPLv3 or higher.
|
// Toolbox is released under the terms of the LGPLv3 or higher.
|
||||||
|
|
||||||
import QtQuick 2.10
|
import QtQuick 2.10
|
||||||
import QtQuick.Controls 1.4
|
import QtQuick.Controls 1.4
|
||||||
import QtQuick.Controls.Styles 1.4
|
|
||||||
import UM 1.1 as UM
|
import UM 1.1 as UM
|
||||||
|
|
||||||
Item
|
Item
|
||||||
|
@ -11,48 +11,17 @@ Item
|
||||||
id: base
|
id: base
|
||||||
|
|
||||||
property var packageData
|
property var packageData
|
||||||
property var technicalDataSheetUrl:
|
property var technicalDataSheetUrl: packageData.links.technicalDataSheet
|
||||||
{
|
property var safetyDataSheetUrl: packageData.links.safetyDataSheet
|
||||||
var link = undefined
|
property var printingGuidelinesUrl: packageData.links.printingGuidelines
|
||||||
if ("Technical Data Sheet" in packageData.links)
|
property var materialWebsiteUrl: packageData.links.website
|
||||||
{
|
|
||||||
// HACK: This is the way the old API (used in 3.6-beta) used to do it. For safety it's still here,
|
|
||||||
// but it can be removed over time.
|
|
||||||
link = packageData.links["Technical Data Sheet"]
|
|
||||||
}
|
|
||||||
else if ("technicalDataSheet" in packageData.links)
|
|
||||||
{
|
|
||||||
link = packageData.links["technicalDataSheet"]
|
|
||||||
}
|
|
||||||
return link
|
|
||||||
}
|
|
||||||
property var safetyDataSheetUrl:
|
|
||||||
{
|
|
||||||
var sds_name = "safetyDataSheet"
|
|
||||||
return (sds_name in packageData.links) ? packageData.links[sds_name] : undefined
|
|
||||||
}
|
|
||||||
property var printingGuidelinesUrl:
|
|
||||||
{
|
|
||||||
var pg_name = "printingGuidelines"
|
|
||||||
return (pg_name in packageData.links) ? packageData.links[pg_name] : undefined
|
|
||||||
}
|
|
||||||
|
|
||||||
property var materialWebsiteUrl:
|
height: childrenRect.height
|
||||||
{
|
onVisibleChanged: packageData.type === "material" && (compatibilityItem.visible || dataSheetLinks.visible)
|
||||||
var pg_name = "website"
|
|
||||||
return (pg_name in packageData.links) ? packageData.links[pg_name] : undefined
|
|
||||||
}
|
|
||||||
anchors.topMargin: UM.Theme.getSize("default_margin").height
|
|
||||||
height: visible ? childrenRect.height : 0
|
|
||||||
|
|
||||||
visible: packageData.type == "material" &&
|
Column
|
||||||
(packageData.has_configs || technicalDataSheetUrl !== undefined ||
|
|
||||||
safetyDataSheetUrl !== undefined || printingGuidelinesUrl !== undefined ||
|
|
||||||
materialWebsiteUrl !== undefined)
|
|
||||||
|
|
||||||
Item
|
|
||||||
{
|
{
|
||||||
id: combatibilityItem
|
id: compatibilityItem
|
||||||
visible: packageData.has_configs
|
visible: packageData.has_configs
|
||||||
width: parent.width
|
width: parent.width
|
||||||
// This is a bit of a hack, but the whole QML is pretty messy right now. This needs a big overhaul.
|
// This is a bit of a hack, but the whole QML is pretty messy right now. This needs a big overhaul.
|
||||||
|
@ -61,7 +30,6 @@ Item
|
||||||
Label
|
Label
|
||||||
{
|
{
|
||||||
id: heading
|
id: heading
|
||||||
anchors.topMargin: UM.Theme.getSize("default_margin").height
|
|
||||||
width: parent.width
|
width: parent.width
|
||||||
text: catalog.i18nc("@label", "Compatibility")
|
text: catalog.i18nc("@label", "Compatibility")
|
||||||
wrapMode: Text.WordWrap
|
wrapMode: Text.WordWrap
|
||||||
|
@ -73,8 +41,6 @@ Item
|
||||||
TableView
|
TableView
|
||||||
{
|
{
|
||||||
id: table
|
id: table
|
||||||
anchors.top: heading.bottom
|
|
||||||
anchors.topMargin: UM.Theme.getSize("default_margin").height
|
|
||||||
width: parent.width
|
width: parent.width
|
||||||
frameVisible: false
|
frameVisible: false
|
||||||
|
|
||||||
|
@ -155,32 +121,32 @@ Item
|
||||||
TableViewColumn
|
TableViewColumn
|
||||||
{
|
{
|
||||||
role: "machine"
|
role: "machine"
|
||||||
title: "Machine"
|
title: catalog.i18nc("@label:table_header", "Machine")
|
||||||
width: Math.floor(table.width * 0.25)
|
width: Math.floor(table.width * 0.25)
|
||||||
delegate: columnTextDelegate
|
delegate: columnTextDelegate
|
||||||
}
|
}
|
||||||
TableViewColumn
|
TableViewColumn
|
||||||
{
|
{
|
||||||
role: "print_core"
|
role: "print_core"
|
||||||
title: "Print Core"
|
title: catalog.i18nc("@label:table_header", "Print Core")
|
||||||
width: Math.floor(table.width * 0.2)
|
width: Math.floor(table.width * 0.2)
|
||||||
}
|
}
|
||||||
TableViewColumn
|
TableViewColumn
|
||||||
{
|
{
|
||||||
role: "build_plate"
|
role: "build_plate"
|
||||||
title: "Build Plate"
|
title: catalog.i18nc("@label:table_header", "Build Plate")
|
||||||
width: Math.floor(table.width * 0.225)
|
width: Math.floor(table.width * 0.225)
|
||||||
}
|
}
|
||||||
TableViewColumn
|
TableViewColumn
|
||||||
{
|
{
|
||||||
role: "support_material"
|
role: "support_material"
|
||||||
title: "Support"
|
title: catalog.i18nc("@label:table_header", "Support")
|
||||||
width: Math.floor(table.width * 0.225)
|
width: Math.floor(table.width * 0.225)
|
||||||
}
|
}
|
||||||
TableViewColumn
|
TableViewColumn
|
||||||
{
|
{
|
||||||
role: "quality"
|
role: "quality"
|
||||||
title: "Quality"
|
title: catalog.i18nc("@label:table_header", "Quality")
|
||||||
width: Math.floor(table.width * 0.1)
|
width: Math.floor(table.width * 0.1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -188,13 +154,14 @@ Item
|
||||||
|
|
||||||
Label
|
Label
|
||||||
{
|
{
|
||||||
id: data_sheet_links
|
id: dataSheetLinks
|
||||||
anchors.top: combatibilityItem.bottom
|
anchors.top: compatibilityItem.bottom
|
||||||
anchors.topMargin: UM.Theme.getSize("default_margin").height / 2
|
anchors.topMargin: UM.Theme.getSize("narrow_margin").height
|
||||||
visible: base.technicalDataSheetUrl !== undefined ||
|
visible: base.technicalDataSheetUrl !== undefined ||
|
||||||
base.safetyDataSheetUrl !== undefined || base.printingGuidelinesUrl !== undefined ||
|
base.safetyDataSheetUrl !== undefined ||
|
||||||
base.materialWebsiteUrl !== undefined
|
base.printingGuidelinesUrl !== undefined ||
|
||||||
height: visible ? contentHeight : 0
|
base.materialWebsiteUrl !== undefined
|
||||||
|
|
||||||
text:
|
text:
|
||||||
{
|
{
|
||||||
var result = ""
|
var result = ""
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
// Copyright (c) 2018 Ultimaker B.V.
|
// Copyright (c) 2019 Ultimaker B.V.
|
||||||
// Toolbox is released under the terms of the LGPLv3 or higher.
|
// Toolbox is released under the terms of the LGPLv3 or higher.
|
||||||
|
|
||||||
import QtQuick 2.7
|
import QtQuick 2.10
|
||||||
import QtQuick.Controls 1.4
|
import QtQuick.Controls 2.3
|
||||||
import QtQuick.Controls.Styles 1.4
|
|
||||||
import UM 1.1 as UM
|
import UM 1.1 as UM
|
||||||
|
|
||||||
Item
|
Item
|
||||||
|
@ -11,10 +10,9 @@ Item
|
||||||
id: detailList
|
id: detailList
|
||||||
ScrollView
|
ScrollView
|
||||||
{
|
{
|
||||||
frameVisible: false
|
clip: true
|
||||||
anchors.fill: detailList
|
anchors.fill: detailList
|
||||||
style: UM.Theme.styles.scrollview
|
|
||||||
flickableItem.flickableDirection: Flickable.VerticalFlick
|
|
||||||
Column
|
Column
|
||||||
{
|
{
|
||||||
anchors
|
anchors
|
||||||
|
|
|
@ -1,30 +1,30 @@
|
||||||
// Copyright (c) 2018 Ultimaker B.V.
|
// Copyright (c) 2019 Ultimaker B.V.
|
||||||
// Toolbox is released under the terms of the LGPLv3 or higher.
|
// Toolbox is released under the terms of the LGPLv3 or higher.
|
||||||
|
|
||||||
import QtQuick 2.10
|
import QtQuick 2.10
|
||||||
import QtQuick.Controls 1.4
|
import QtQuick.Controls 2.3
|
||||||
import QtQuick.Controls.Styles 1.4
|
|
||||||
import UM 1.1 as UM
|
import UM 1.1 as UM
|
||||||
|
|
||||||
Item
|
Item
|
||||||
{
|
{
|
||||||
id: tile
|
id: tile
|
||||||
width: detailList.width - UM.Theme.getSize("wide_margin").width
|
width: detailList.width - UM.Theme.getSize("wide_margin").width
|
||||||
height: normalData.height + compatibilityChart.height + 4 * UM.Theme.getSize("default_margin").height
|
height: normalData.height + 2 * UM.Theme.getSize("wide_margin").height
|
||||||
Item
|
Column
|
||||||
{
|
{
|
||||||
id: normalData
|
id: normalData
|
||||||
height: childrenRect.height
|
|
||||||
anchors
|
anchors
|
||||||
{
|
{
|
||||||
|
top: parent.top
|
||||||
left: parent.left
|
left: parent.left
|
||||||
right: controls.left
|
right: controls.left
|
||||||
rightMargin: UM.Theme.getSize("default_margin").width * 2 + UM.Theme.getSize("toolbox_loader").width
|
rightMargin: UM.Theme.getSize("wide_margin").width
|
||||||
top: parent.top
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Label
|
Label
|
||||||
{
|
{
|
||||||
id: packageName
|
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: UM.Theme.getSize("toolbox_property_label").height
|
height: UM.Theme.getSize("toolbox_property_label").height
|
||||||
text: model.name
|
text: model.name
|
||||||
|
@ -33,9 +33,9 @@ Item
|
||||||
font: UM.Theme.getFont("medium_bold")
|
font: UM.Theme.getFont("medium_bold")
|
||||||
renderType: Text.NativeRendering
|
renderType: Text.NativeRendering
|
||||||
}
|
}
|
||||||
|
|
||||||
Label
|
Label
|
||||||
{
|
{
|
||||||
anchors.top: packageName.bottom
|
|
||||||
width: parent.width
|
width: parent.width
|
||||||
text: model.description
|
text: model.description
|
||||||
maximumLineCount: 25
|
maximumLineCount: 25
|
||||||
|
@ -45,6 +45,12 @@ Item
|
||||||
font: UM.Theme.getFont("default")
|
font: UM.Theme.getFont("default")
|
||||||
renderType: Text.NativeRendering
|
renderType: Text.NativeRendering
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ToolboxCompatibilityChart
|
||||||
|
{
|
||||||
|
width: parent.width
|
||||||
|
packageData: model
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ToolboxDetailTileActions
|
ToolboxDetailTileActions
|
||||||
|
@ -57,20 +63,12 @@ Item
|
||||||
packageData: model
|
packageData: model
|
||||||
}
|
}
|
||||||
|
|
||||||
ToolboxCompatibilityChart
|
|
||||||
{
|
|
||||||
id: compatibilityChart
|
|
||||||
anchors.top: normalData.bottom
|
|
||||||
width: normalData.width
|
|
||||||
packageData: model
|
|
||||||
}
|
|
||||||
|
|
||||||
Rectangle
|
Rectangle
|
||||||
{
|
{
|
||||||
color: UM.Theme.getColor("lining")
|
color: UM.Theme.getColor("lining")
|
||||||
width: tile.width
|
width: tile.width
|
||||||
height: UM.Theme.getSize("default_lining").height
|
height: UM.Theme.getSize("default_lining").height
|
||||||
anchors.top: compatibilityChart.bottom
|
anchors.top: normalData.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.
|
anchors.topMargin: UM.Theme.getSize("default_margin").height + UM.Theme.getSize("wide_margin").height //Normal margin for spacing after chart, wide margin between items.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,7 +35,7 @@ Column
|
||||||
// Don't allow installing while another download is running
|
// Don't allow installing while another download is running
|
||||||
enabled: installed || (!(toolbox.isDownloading && toolbox.activePackage != model) && !loginRequired)
|
enabled: installed || (!(toolbox.isDownloading && toolbox.activePackage != model) && !loginRequired)
|
||||||
opacity: enabled ? 1.0 : 0.5
|
opacity: enabled ? 1.0 : 0.5
|
||||||
visible: !updateButton.visible && !installed// Don't show when the update button is visible
|
visible: !updateButton.visible && !installed // Don't show when the update button is visible
|
||||||
}
|
}
|
||||||
|
|
||||||
Cura.SecondaryButton
|
Cura.SecondaryButton
|
||||||
|
|
|
@ -2,9 +2,7 @@
|
||||||
// Toolbox is released under the terms of the LGPLv3 or higher.
|
// Toolbox is released under the terms of the LGPLv3 or higher.
|
||||||
|
|
||||||
import QtQuick 2.10
|
import QtQuick 2.10
|
||||||
import QtQuick.Controls 1.4
|
import QtQuick.Controls 2.3
|
||||||
import QtQuick.Controls.Styles 1.4
|
|
||||||
import QtQuick.Layouts 1.3
|
|
||||||
import UM 1.1 as UM
|
import UM 1.1 as UM
|
||||||
|
|
||||||
Column
|
Column
|
||||||
|
|
|
@ -1,25 +1,20 @@
|
||||||
// Copyright (c) 2018 Ultimaker B.V.
|
// Copyright (c) 2019 Ultimaker B.V.
|
||||||
// Toolbox is released under the terms of the LGPLv3 or higher.
|
// Toolbox is released under the terms of the LGPLv3 or higher.
|
||||||
|
|
||||||
import QtQuick 2.7
|
import QtQuick 2.10
|
||||||
import QtQuick.Controls 1.4
|
import QtQuick.Controls 2.3
|
||||||
import QtQuick.Controls.Styles 1.4
|
|
||||||
import UM 1.1 as UM
|
import UM 1.1 as UM
|
||||||
|
|
||||||
ScrollView
|
ScrollView
|
||||||
{
|
{
|
||||||
frameVisible: false
|
clip: true
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: parent.height
|
height: parent.height
|
||||||
style: UM.Theme.styles.scrollview
|
|
||||||
|
|
||||||
flickableItem.flickableDirection: Flickable.VerticalFlick
|
|
||||||
|
|
||||||
Column
|
Column
|
||||||
{
|
{
|
||||||
width: base.width
|
width: base.width
|
||||||
spacing: UM.Theme.getSize("default_margin").height
|
spacing: UM.Theme.getSize("default_margin").height
|
||||||
height: childrenRect.height
|
|
||||||
|
|
||||||
ToolboxDownloadsShowcase
|
ToolboxDownloadsShowcase
|
||||||
{
|
{
|
||||||
|
@ -31,14 +26,14 @@ ScrollView
|
||||||
{
|
{
|
||||||
id: allPlugins
|
id: allPlugins
|
||||||
width: parent.width
|
width: parent.width
|
||||||
heading: toolbox.viewCategory == "material" ? catalog.i18nc("@label", "Community Contributions") : catalog.i18nc("@label", "Community Plugins")
|
heading: toolbox.viewCategory === "material" ? catalog.i18nc("@label", "Community Contributions") : catalog.i18nc("@label", "Community Plugins")
|
||||||
model: toolbox.viewCategory == "material" ? toolbox.materialsAvailableModel : toolbox.pluginsAvailableModel
|
model: toolbox.viewCategory === "material" ? toolbox.materialsAvailableModel : toolbox.pluginsAvailableModel
|
||||||
}
|
}
|
||||||
|
|
||||||
ToolboxDownloadsGrid
|
ToolboxDownloadsGrid
|
||||||
{
|
{
|
||||||
id: genericMaterials
|
id: genericMaterials
|
||||||
visible: toolbox.viewCategory == "material"
|
visible: toolbox.viewCategory === "material"
|
||||||
width: parent.width
|
width: parent.width
|
||||||
heading: catalog.i18nc("@label", "Generic Materials")
|
heading: catalog.i18nc("@label", "Generic Materials")
|
||||||
model: toolbox.materialsGenericModel
|
model: toolbox.materialsGenericModel
|
||||||
|
|
|
@ -1,50 +1,50 @@
|
||||||
// Copyright (c) 2018 Ultimaker B.V.
|
// Copyright (c) 2019 Ultimaker B.V.
|
||||||
// Toolbox is released under the terms of the LGPLv3 or higher.
|
// Toolbox is released under the terms of the LGPLv3 or higher.
|
||||||
|
|
||||||
import QtQuick 2.10
|
import QtQuick 2.10
|
||||||
import QtQuick.Dialogs 1.1
|
import QtQuick.Controls 2.3
|
||||||
import QtQuick.Window 2.2
|
|
||||||
import QtQuick.Controls 1.4
|
|
||||||
import QtQuick.Controls.Styles 1.4
|
|
||||||
|
|
||||||
import UM 1.1 as UM
|
import UM 1.1 as UM
|
||||||
|
|
||||||
ScrollView
|
ScrollView
|
||||||
{
|
{
|
||||||
id: page
|
id: page
|
||||||
frameVisible: false
|
clip: true
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: parent.height
|
height: parent.height
|
||||||
style: UM.Theme.styles.scrollview
|
|
||||||
flickableItem.flickableDirection: Flickable.VerticalFlick
|
|
||||||
|
|
||||||
Column
|
Column
|
||||||
{
|
{
|
||||||
|
width: page.width
|
||||||
spacing: UM.Theme.getSize("default_margin").height
|
spacing: UM.Theme.getSize("default_margin").height
|
||||||
|
padding: UM.Theme.getSize("wide_margin").width
|
||||||
visible: toolbox.pluginsInstalledModel.items.length > 0
|
visible: toolbox.pluginsInstalledModel.items.length > 0
|
||||||
height: childrenRect.height + 4 * UM.Theme.getSize("default_margin").height
|
height: childrenRect.height + 2 * UM.Theme.getSize("wide_margin").height
|
||||||
|
|
||||||
anchors
|
|
||||||
{
|
|
||||||
right: parent.right
|
|
||||||
left: parent.left
|
|
||||||
margins: UM.Theme.getSize("default_margin").width
|
|
||||||
top: parent.top
|
|
||||||
}
|
|
||||||
|
|
||||||
Label
|
Label
|
||||||
{
|
{
|
||||||
width: page.width
|
anchors
|
||||||
|
{
|
||||||
|
left: parent.left
|
||||||
|
right: parent.right
|
||||||
|
margins: parent.padding
|
||||||
|
}
|
||||||
text: catalog.i18nc("@title:tab", "Plugins")
|
text: catalog.i18nc("@title:tab", "Plugins")
|
||||||
color: UM.Theme.getColor("text_medium")
|
color: UM.Theme.getColor("text_medium")
|
||||||
font: UM.Theme.getFont("large")
|
font: UM.Theme.getFont("large")
|
||||||
renderType: Text.NativeRendering
|
renderType: Text.NativeRendering
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle
|
Rectangle
|
||||||
{
|
{
|
||||||
|
anchors
|
||||||
|
{
|
||||||
|
left: parent.left
|
||||||
|
right: parent.right
|
||||||
|
margins: parent.padding
|
||||||
|
}
|
||||||
id: installedPlugins
|
id: installedPlugins
|
||||||
color: "transparent"
|
color: "transparent"
|
||||||
width: parent.width
|
|
||||||
height: childrenRect.height + UM.Theme.getSize("default_margin").width
|
height: childrenRect.height + UM.Theme.getSize("default_margin").width
|
||||||
border.color: UM.Theme.getColor("lining")
|
border.color: UM.Theme.getColor("lining")
|
||||||
border.width: UM.Theme.getSize("default_lining").width
|
border.width: UM.Theme.getSize("default_lining").width
|
||||||
|
@ -65,8 +65,15 @@ ScrollView
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Label
|
Label
|
||||||
{
|
{
|
||||||
|
anchors
|
||||||
|
{
|
||||||
|
left: parent.left
|
||||||
|
right: parent.right
|
||||||
|
margins: parent.padding
|
||||||
|
}
|
||||||
text: catalog.i18nc("@title:tab", "Materials")
|
text: catalog.i18nc("@title:tab", "Materials")
|
||||||
color: UM.Theme.getColor("text_medium")
|
color: UM.Theme.getColor("text_medium")
|
||||||
font: UM.Theme.getFont("medium")
|
font: UM.Theme.getFont("medium")
|
||||||
|
@ -75,9 +82,14 @@ ScrollView
|
||||||
|
|
||||||
Rectangle
|
Rectangle
|
||||||
{
|
{
|
||||||
|
anchors
|
||||||
|
{
|
||||||
|
left: parent.left
|
||||||
|
right: parent.right
|
||||||
|
margins: parent.padding
|
||||||
|
}
|
||||||
id: installedMaterials
|
id: installedMaterials
|
||||||
color: "transparent"
|
color: "transparent"
|
||||||
width: parent.width
|
|
||||||
height: childrenRect.height + UM.Theme.getSize("default_margin").width
|
height: childrenRect.height + UM.Theme.getSize("default_margin").width
|
||||||
border.color: UM.Theme.getColor("lining")
|
border.color: UM.Theme.getColor("lining")
|
||||||
border.width: UM.Theme.getSize("default_lining").width
|
border.width: UM.Theme.getSize("default_lining").width
|
||||||
|
|
|
@ -41,7 +41,7 @@ Item
|
||||||
Column
|
Column
|
||||||
{
|
{
|
||||||
id: pluginInfo
|
id: pluginInfo
|
||||||
topPadding: Math.floor(UM.Theme.getSize("default_margin").height / 2)
|
topPadding: UM.Theme.getSize("narrow_margin").height
|
||||||
property var color: model.type === "plugin" && !isEnabled ? UM.Theme.getColor("lining") : UM.Theme.getColor("text")
|
property var color: model.type === "plugin" && !isEnabled ? UM.Theme.getColor("lining") : UM.Theme.getColor("text")
|
||||||
width: Math.floor(tileRow.width - (authorInfo.width + pluginActions.width + 2 * tileRow.spacing + ((disableButton.visible) ? disableButton.width + tileRow.spacing : 0)))
|
width: Math.floor(tileRow.width - (authorInfo.width + pluginActions.width + 2 * tileRow.spacing + ((disableButton.visible) ? disableButton.width + tileRow.spacing : 0)))
|
||||||
Label
|
Label
|
||||||
|
|
|
@ -1,16 +1,16 @@
|
||||||
// Copyright (c) 2018 Ultimaker B.V.
|
// Copyright (c) 2019 Ultimaker B.V.
|
||||||
// Toolbox is released under the terms of the LGPLv3 or higher.
|
// Toolbox is released under the terms of the LGPLv3 or higher.
|
||||||
|
|
||||||
import QtQuick 2.2
|
import QtQuick 2.10
|
||||||
import QtQuick.Controls 1.4
|
import QtQuick.Controls 2.3
|
||||||
import QtQuick.Controls.Styles 1.4
|
|
||||||
import UM 1.1 as UM
|
import UM 1.1 as UM
|
||||||
import Cura 1.0 as Cura
|
import Cura 1.0 as Cura
|
||||||
|
|
||||||
|
|
||||||
Item
|
Cura.PrimaryButton
|
||||||
{
|
{
|
||||||
id: base
|
id: button
|
||||||
|
|
||||||
property var active: false
|
property var active: false
|
||||||
property var complete: false
|
property var complete: false
|
||||||
|
@ -25,43 +25,36 @@ Item
|
||||||
|
|
||||||
width: UM.Theme.getSize("toolbox_action_button").width
|
width: UM.Theme.getSize("toolbox_action_button").width
|
||||||
height: UM.Theme.getSize("toolbox_action_button").height
|
height: UM.Theme.getSize("toolbox_action_button").height
|
||||||
|
fixedWidthMode: true
|
||||||
Cura.PrimaryButton
|
text:
|
||||||
{
|
{
|
||||||
id: button
|
if (complete)
|
||||||
width: UM.Theme.getSize("toolbox_action_button").width
|
|
||||||
height: UM.Theme.getSize("toolbox_action_button").height
|
|
||||||
fixedWidthMode: true
|
|
||||||
text:
|
|
||||||
{
|
{
|
||||||
if (complete)
|
return completeLabel
|
||||||
{
|
|
||||||
return completeLabel
|
|
||||||
}
|
|
||||||
else if (active)
|
|
||||||
{
|
|
||||||
return activeLabel
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return readyLabel
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
onClicked:
|
else if (active)
|
||||||
{
|
{
|
||||||
if (complete)
|
return activeLabel
|
||||||
{
|
}
|
||||||
completeAction()
|
else
|
||||||
}
|
{
|
||||||
else if (active)
|
return readyLabel
|
||||||
{
|
|
||||||
activeAction()
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
readyAction()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
busy: active
|
|
||||||
}
|
}
|
||||||
|
onClicked:
|
||||||
|
{
|
||||||
|
if (complete)
|
||||||
|
{
|
||||||
|
completeAction()
|
||||||
|
}
|
||||||
|
else if (active)
|
||||||
|
{
|
||||||
|
activeAction()
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
readyAction()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
busy: active
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue