mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-05-28 17:18:39 +08:00
Merge branch 'master' of github.com:Ultimaker/Cura
This commit is contained in:
commit
be81d4c4cc
@ -12,6 +12,8 @@ Window
|
||||
property var selection: null
|
||||
title: catalog.i18nc("@title", "Toolbox")
|
||||
modality: Qt.ApplicationModal
|
||||
flags: Qt.Dialog | Qt.CustomizeWindowHint | Qt.WindowTitleHint | Qt.WindowCloseButtonHint
|
||||
|
||||
width: 720 * screenScaleFactor
|
||||
height: 640 * screenScaleFactor
|
||||
minimumWidth: 720 * screenScaleFactor
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Copyright (c) 2018 Ultimaker B.V.
|
||||
// Toolbox is released under the terms of the LGPLv3 or higher.
|
||||
|
||||
import QtQuick 2.2
|
||||
import QtQuick 2.3
|
||||
import QtQuick.Controls 1.4
|
||||
import QtQuick.Controls.Styles 1.4
|
||||
import UM 1.1 as UM
|
||||
@ -9,7 +9,7 @@ import UM 1.1 as UM
|
||||
Item
|
||||
{
|
||||
id: page
|
||||
property var details: base.selection
|
||||
property var details: base.selection || {}
|
||||
anchors.fill: parent
|
||||
ToolboxBackColumn
|
||||
{
|
||||
@ -32,6 +32,7 @@ Item
|
||||
height: UM.Theme.getSize("toolbox_thumbnail_medium").height
|
||||
fillMode: Image.PreserveAspectFit
|
||||
source: details.icon_url || "../images/logobot.svg"
|
||||
mipmap: true
|
||||
anchors
|
||||
{
|
||||
top: parent.top
|
||||
@ -53,7 +54,7 @@ Item
|
||||
rightMargin: UM.Theme.getSize("wide_margin").width
|
||||
bottomMargin: UM.Theme.getSize("default_margin").height
|
||||
}
|
||||
text: details.name
|
||||
text: details.name || ""
|
||||
font: UM.Theme.getFont("large")
|
||||
wrapMode: Text.WordWrap
|
||||
width: parent.width
|
||||
@ -62,7 +63,7 @@ Item
|
||||
Label
|
||||
{
|
||||
id: description
|
||||
text: details.description
|
||||
text: details.description || ""
|
||||
anchors
|
||||
{
|
||||
top: title.bottom
|
||||
@ -114,6 +115,7 @@ Item
|
||||
}
|
||||
font: UM.Theme.getFont("very_small")
|
||||
color: UM.Theme.getColor("text")
|
||||
linkColor: UM.Theme.getColor("text_link")
|
||||
onLinkActivated: Qt.openUrlExternally(link)
|
||||
}
|
||||
}
|
||||
|
@ -37,8 +37,8 @@ Item
|
||||
Label
|
||||
{
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
elide: styleData.elideMode
|
||||
text: styleData.value
|
||||
elide: Text.ElideRight
|
||||
text: styleData.value || ""
|
||||
color: UM.Theme.getColor("text")
|
||||
font: UM.Theme.getFont("default_bold")
|
||||
}
|
||||
@ -56,8 +56,8 @@ Item
|
||||
Label
|
||||
{
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
elide: styleData.elideMode
|
||||
text: styleData.value
|
||||
elide: Text.ElideRight
|
||||
text: styleData.value || ""
|
||||
color: UM.Theme.getColor("text_medium")
|
||||
font: UM.Theme.getFont("default")
|
||||
}
|
||||
@ -68,8 +68,8 @@ Item
|
||||
Label
|
||||
{
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
elide: styleData.elideMode
|
||||
text: styleData.value
|
||||
elide: Text.ElideRight
|
||||
text: styleData.value || ""
|
||||
color: UM.Theme.getColor("text_medium")
|
||||
font: UM.Theme.getFont("default")
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Copyright (c) 2018 Ultimaker B.V.
|
||||
// Toolbox is released under the terms of the LGPLv3 or higher.
|
||||
|
||||
import QtQuick 2.2
|
||||
import QtQuick 2.3
|
||||
import QtQuick.Controls 1.4
|
||||
import QtQuick.Controls.Styles 1.4
|
||||
import UM 1.1 as UM
|
||||
@ -33,6 +33,7 @@ Item
|
||||
height: UM.Theme.getSize("toolbox_thumbnail_medium").height
|
||||
fillMode: Image.PreserveAspectFit
|
||||
source: details.icon_url || "../images/logobot.svg"
|
||||
mipmap: true
|
||||
anchors
|
||||
{
|
||||
top: parent.top
|
||||
@ -54,8 +55,9 @@ Item
|
||||
rightMargin: UM.Theme.getSize("wide_margin").width
|
||||
bottomMargin: UM.Theme.getSize("default_margin").height
|
||||
}
|
||||
text: details.name
|
||||
text: details.name || ""
|
||||
font: UM.Theme.getFont("large")
|
||||
color: UM.Theme.getColor("text")
|
||||
wrapMode: Text.WordWrap
|
||||
width: parent.width
|
||||
height: UM.Theme.getSize("toolbox_property_label").height
|
||||
@ -133,6 +135,7 @@ Item
|
||||
}
|
||||
font: UM.Theme.getFont("very_small")
|
||||
color: UM.Theme.getColor("text")
|
||||
linkColor: UM.Theme.getColor("text_link")
|
||||
onLinkActivated: Qt.openUrlExternally(link)
|
||||
}
|
||||
}
|
||||
|
@ -11,7 +11,7 @@ Item
|
||||
id: tile
|
||||
property bool installed: toolbox.isInstalled(model.id)
|
||||
width: detailList.width - UM.Theme.getSize("wide_margin").width
|
||||
height: Math.max(UM.Theme.getSize("toolbox_detail_tile").height, childrenRect.height + UM.Theme.getSize("default_margin").height)
|
||||
height: normalData.height + compatibilityChart.height + 4 * UM.Theme.getSize("default_margin").height
|
||||
Item
|
||||
{
|
||||
id: normalData
|
||||
@ -76,58 +76,9 @@ Item
|
||||
}
|
||||
enabled: installed || !(toolbox.isDownloading && toolbox.activePackage != model) //Don't allow installing while another download is running.
|
||||
opacity: enabled ? 1.0 : 0.5
|
||||
style: ButtonStyle
|
||||
{
|
||||
background: Rectangle
|
||||
{
|
||||
implicitWidth: 96
|
||||
implicitHeight: 30
|
||||
color:
|
||||
{
|
||||
if (installed)
|
||||
{
|
||||
return UM.Theme.getColor("action_button_disabled")
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( control.hovered )
|
||||
{
|
||||
return UM.Theme.getColor("primary_hover")
|
||||
}
|
||||
else
|
||||
{
|
||||
return UM.Theme.getColor("primary")
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
label: Label
|
||||
{
|
||||
text: control.text
|
||||
color:
|
||||
{
|
||||
if (installed)
|
||||
{
|
||||
return UM.Theme.getColor("action_button_disabled_text")
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( control.hovered )
|
||||
{
|
||||
return UM.Theme.getColor("button_text_hover")
|
||||
}
|
||||
else
|
||||
{
|
||||
return UM.Theme.getColor("button_text")
|
||||
}
|
||||
}
|
||||
}
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
font: UM.Theme.getFont("default_bold")
|
||||
}
|
||||
}
|
||||
property alias installed: tile.installed
|
||||
style: UM.Theme.styles.toolbox_action_button
|
||||
onClicked:
|
||||
{
|
||||
if (installed)
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Copyright (c) 2018 Ultimaker B.V.
|
||||
// Toolbox is released under the terms of the LGPLv3 or higher.
|
||||
|
||||
import QtQuick 2.2
|
||||
import QtQuick 2.3
|
||||
import QtQuick.Controls 1.4
|
||||
import QtQuick.Controls.Styles 1.4
|
||||
import QtQuick.Layouts 1.3
|
||||
@ -34,10 +34,11 @@ Item
|
||||
Image
|
||||
{
|
||||
anchors.centerIn: parent
|
||||
width: UM.Theme.getSize("toolbox_thumbnail_small").width - 26
|
||||
height: UM.Theme.getSize("toolbox_thumbnail_small").height - 26
|
||||
width: UM.Theme.getSize("toolbox_thumbnail_small").width - UM.Theme.getSize("wide_margin").width
|
||||
height: UM.Theme.getSize("toolbox_thumbnail_small").height - UM.Theme.getSize("wide_margin").width
|
||||
fillMode: Image.PreserveAspectFit
|
||||
source: model.icon_url || "../images/logobot.svg"
|
||||
mipmap: true
|
||||
}
|
||||
}
|
||||
Column
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Copyright (c) 2018 Ultimaker B.V.
|
||||
// Toolbox is released under the terms of the LGPLv3 or higher.
|
||||
|
||||
import QtQuick 2.2
|
||||
import QtQuick 2.3
|
||||
import QtQuick.Controls 1.4
|
||||
import QtQuick.Controls.Styles 1.4
|
||||
import UM 1.1 as UM
|
||||
@ -9,7 +9,7 @@ import UM 1.1 as UM
|
||||
Item
|
||||
{
|
||||
width: UM.Theme.getSize("toolbox_thumbnail_large").width
|
||||
height: childrenRect.height
|
||||
height: thumbnail.height + packageName.height
|
||||
Rectangle
|
||||
{
|
||||
id: highlight
|
||||
@ -40,14 +40,16 @@ Item
|
||||
height: UM.Theme.getSize("toolbox_thumbnail_large").height - 2 * UM.Theme.getSize("default_margin").height
|
||||
fillMode: Image.PreserveAspectFit
|
||||
source: model.icon_url || "../images/logobot.svg"
|
||||
mipmap: true
|
||||
}
|
||||
}
|
||||
Label
|
||||
{
|
||||
id: packageName
|
||||
text: model.name
|
||||
anchors
|
||||
{
|
||||
bottom: parent.bottom
|
||||
top: thumbnail.bottom
|
||||
horizontalCenter: parent.horizontalCenter
|
||||
}
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
|
@ -49,7 +49,7 @@ Item
|
||||
implicitHeight: Math.floor(UM.Theme.getSize("toolbox_footer_button").height)
|
||||
color: control.hovered ? UM.Theme.getColor("primary_hover") : UM.Theme.getColor("primary")
|
||||
}
|
||||
label: Text
|
||||
label: Label
|
||||
{
|
||||
color: UM.Theme.getColor("button_text")
|
||||
font: UM.Theme.getFont("default_bold")
|
||||
|
@ -89,6 +89,7 @@ Item
|
||||
horizontalAlignment: Text.AlignLeft
|
||||
onLinkActivated: Qt.openUrlExternally("mailto:" + model.author_email + "?Subject=Cura: " + model.name + " Plugin")
|
||||
color: model.enabled ? UM.Theme.getColor("text") : UM.Theme.getColor("lining")
|
||||
linkColor: UM.Theme.getColor("text_link")
|
||||
}
|
||||
}
|
||||
Column
|
||||
@ -130,7 +131,7 @@ Item
|
||||
color: UM.Theme.getColor("lining")
|
||||
}
|
||||
}
|
||||
label: Text
|
||||
label: Label
|
||||
{
|
||||
text: control.text
|
||||
color: UM.Theme.getColor("text")
|
||||
|
@ -42,7 +42,7 @@ UM.Dialog
|
||||
anchors.right: parent.right
|
||||
anchors.topMargin: UM.Theme.getSize("default_margin").height
|
||||
readOnly: true
|
||||
text: licenseDialog.licenseContent
|
||||
text: licenseDialog.licenseContent || ""
|
||||
}
|
||||
}
|
||||
rightButtons:
|
||||
|
@ -25,7 +25,7 @@ Button
|
||||
height: UM.Theme.getSize("sidebar_header_highlight").height
|
||||
}
|
||||
}
|
||||
label: Text
|
||||
label: Label
|
||||
{
|
||||
text: control.text
|
||||
color:
|
||||
|
@ -1033,4 +1033,59 @@ QtObject {
|
||||
label: Item { }
|
||||
}
|
||||
}
|
||||
|
||||
property Component toolbox_action_button: Component {
|
||||
ButtonStyle
|
||||
{
|
||||
background: Rectangle
|
||||
{
|
||||
implicitWidth: UM.Theme.getSize("toolbox_action_button").width
|
||||
implicitHeight: UM.Theme.getSize("toolbox_action_button").height
|
||||
color:
|
||||
{
|
||||
if (control.installed)
|
||||
{
|
||||
return UM.Theme.getColor("action_button_disabled")
|
||||
}
|
||||
else
|
||||
{
|
||||
if (control.hovered)
|
||||
{
|
||||
return UM.Theme.getColor("primary_hover")
|
||||
}
|
||||
else
|
||||
{
|
||||
return UM.Theme.getColor("primary")
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
label: Label
|
||||
{
|
||||
text: control.text
|
||||
color:
|
||||
{
|
||||
if (control.installed)
|
||||
{
|
||||
return UM.Theme.getColor("action_button_disabled_text")
|
||||
}
|
||||
else
|
||||
{
|
||||
if (control.hovered)
|
||||
{
|
||||
return UM.Theme.getColor("button_text_hover")
|
||||
}
|
||||
else
|
||||
{
|
||||
return UM.Theme.getColor("button_text")
|
||||
}
|
||||
}
|
||||
}
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
font: UM.Theme.getFont("default_bold")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -460,6 +460,7 @@
|
||||
"toolbox_header": [1.0, 4.0],
|
||||
"toolbox_action_button": [8.0, 2.5],
|
||||
"toolbox_progress_bar": [8.0, 0.5],
|
||||
"toolbox_chart_row": [1.0, 2.0]
|
||||
"toolbox_chart_row": [1.0, 2.0],
|
||||
"toolbox_action_button": [8.0, 2.5]
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user