Replace usage of controls label with our custom label

This prevents copy pasting a bunch of parameters that we set by default
This commit is contained in:
Jaime van Kessel 2021-11-10 16:37:26 +01:00
parent 0bb09a4783
commit 83be495414
68 changed files with 225 additions and 572 deletions

View file

@ -6,7 +6,7 @@ import QtQuick.Controls 2.1
import QtQuick.Layouts 1.3 import QtQuick.Layouts 1.3
import QtQuick.Dialogs 1.1 import QtQuick.Dialogs 1.1
import UM 1.1 as UM import UM 1.5 as UM
import Cura 1.0 as Cura import Cura 1.0 as Cura
Item Item
@ -42,28 +42,22 @@ Item
onClicked: backupListItem.showDetails = !backupListItem.showDetails onClicked: backupListItem.showDetails = !backupListItem.showDetails
} }
Label UM.Label
{ {
text: new Date(modelData.generated_time).toLocaleString(UM.Preferences.getValue("general/language")) text: new Date(modelData.generated_time).toLocaleString(UM.Preferences.getValue("general/language"))
color: UM.Theme.getColor("text")
elide: Text.ElideRight elide: Text.ElideRight
Layout.minimumWidth: 100 * screenScaleFactor Layout.minimumWidth: 100 * screenScaleFactor
Layout.maximumWidth: 500 * screenScaleFactor Layout.maximumWidth: 500 * screenScaleFactor
Layout.fillWidth: true Layout.fillWidth: true
font: UM.Theme.getFont("default")
renderType: Text.NativeRendering
} }
Label UM.Label
{ {
text: modelData.metadata.description text: modelData.metadata.description
color: UM.Theme.getColor("text")
elide: Text.ElideRight elide: Text.ElideRight
Layout.minimumWidth: 100 * screenScaleFactor Layout.minimumWidth: 100 * screenScaleFactor
Layout.maximumWidth: 500 * screenScaleFactor Layout.maximumWidth: 500 * screenScaleFactor
Layout.fillWidth: true Layout.fillWidth: true
font: UM.Theme.getFont("default")
renderType: Text.NativeRendering
} }
Cura.SecondaryButton Cura.SecondaryButton

View file

@ -5,7 +5,7 @@ import QtQuick 2.7
import QtQuick.Controls 2.1 import QtQuick.Controls 2.1
import QtQuick.Layouts 1.3 import QtQuick.Layouts 1.3
import UM 1.3 as UM import UM 1.5 as UM
RowLayout RowLayout
{ {
@ -26,27 +26,21 @@ RowLayout
color: UM.Theme.getColor("text") color: UM.Theme.getColor("text")
} }
Label UM.Label
{ {
id: detailName id: detailName
color: UM.Theme.getColor("text")
elide: Text.ElideRight elide: Text.ElideRight
Layout.minimumWidth: 50 * screenScaleFactor Layout.minimumWidth: 50 * screenScaleFactor
Layout.maximumWidth: 100 * screenScaleFactor Layout.maximumWidth: 100 * screenScaleFactor
Layout.fillWidth: true Layout.fillWidth: true
font: UM.Theme.getFont("default")
renderType: Text.NativeRendering
} }
Label UM.Label
{ {
id: detailValue id: detailValue
color: UM.Theme.getColor("text")
elide: Text.ElideRight elide: Text.ElideRight
Layout.minimumWidth: 50 * screenScaleFactor Layout.minimumWidth: 50 * screenScaleFactor
Layout.maximumWidth: 100 * screenScaleFactor Layout.maximumWidth: 100 * screenScaleFactor
Layout.fillWidth: true Layout.fillWidth: true
font: UM.Theme.getFont("default")
renderType: Text.NativeRendering
} }
} }

View file

@ -5,7 +5,7 @@ import QtQuick 2.7
import QtQuick.Controls 2.1 import QtQuick.Controls 2.1
import QtQuick.Window 2.2 import QtQuick.Window 2.2
import UM 1.3 as UM import UM 1.5 as UM
import Cura 1.1 as Cura import Cura 1.1 as Cura
import "../components" import "../components"
@ -28,18 +28,14 @@ Column
width: Math.round(parent.width / 4) width: Math.round(parent.width / 4)
} }
Label UM.Label
{ {
id: welcomeTextLabel id: welcomeTextLabel
text: catalog.i18nc("@description", "Backup and synchronize your Cura settings.") text: catalog.i18nc("@description", "Backup and synchronize your Cura settings.")
width: Math.round(parent.width / 2) width: Math.round(parent.width / 2)
font: UM.Theme.getFont("default")
color: UM.Theme.getColor("text")
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
wrapMode: Label.WordWrap wrapMode: Label.WordWrap
renderType: Text.NativeRendering
} }
Cura.PrimaryButton Cura.PrimaryButton

View file

@ -5,7 +5,7 @@ import QtQuick 2.2
import QtQuick.Controls 1.2 import QtQuick.Controls 1.2
import QtQuick.Controls.Styles 1.2 import QtQuick.Controls.Styles 1.2
import UM 1.2 as UM import UM 1.5 as UM
import Cura 1.0 as Cura import Cura 1.0 as Cura
import ".." import ".."
@ -126,13 +126,10 @@ Item
} }
Label UM.Label
{ {
id: meshTypeLabel id: meshTypeLabel
font: UM.Theme.getFont("default")
color: UM.Theme.getColor("text")
height: UM.Theme.getSize("setting").height height: UM.Theme.getSize("setting").height
verticalAlignment: Text.AlignVCenter
} }

View file

@ -5,7 +5,7 @@ import QtQuick 2.9
import QtQuick.Layouts 1.1 import QtQuick.Layouts 1.1
import QtQuick.Controls 2.3 import QtQuick.Controls 2.3
import UM 1.3 as UM import UM 1.5 as UM
import Cura 1.1 as Cura import Cura 1.1 as Cura
@ -131,14 +131,10 @@ Item
height: UM.Theme.getSize("action_button").height height: UM.Theme.getSize("action_button").height
hoverEnabled: true hoverEnabled: true
contentItem: Label contentItem: UM.Label
{ {
text: model.displayText text: model.displayText
color: UM.Theme.getColor("text")
font: UM.Theme.getFont("medium") font: UM.Theme.getFont("medium")
renderType: Text.NativeRendering
verticalAlignment: Text.AlignVCenter
width: contentWidth width: contentWidth
height: parent.height height: parent.height
} }

View file

@ -43,22 +43,19 @@ Cura.ExpandableComponent
headerItem: Item headerItem: Item
{ {
Label UM.Label
{ {
id: colorSchemeLabel id: colorSchemeLabel
text: catalog.i18nc("@label", "Color scheme") text: catalog.i18nc("@label", "Color scheme")
verticalAlignment: Text.AlignVCenter
height: parent.height height: parent.height
elide: Text.ElideRight elide: Text.ElideRight
font: UM.Theme.getFont("medium") font: UM.Theme.getFont("medium")
color: UM.Theme.getColor("text_medium") color: UM.Theme.getColor("text_medium")
renderType: Text.NativeRendering
} }
Label UM.Label
{ {
text: layerTypeCombobox.currentText text: layerTypeCombobox.currentText
verticalAlignment: Text.AlignVCenter
anchors anchors
{ {
left: colorSchemeLabel.right left: colorSchemeLabel.right
@ -68,8 +65,6 @@ Cura.ExpandableComponent
height: parent.height height: parent.height
elide: Text.ElideRight elide: Text.ElideRight
font: UM.Theme.getFont("medium") font: UM.Theme.getFont("medium")
color: UM.Theme.getColor("text")
renderType: Text.NativeRendering
} }
} }
@ -165,16 +160,13 @@ Cura.ExpandableComponent
} }
} }
Label UM.Label
{ {
id: compatibilityModeLabel id: compatibilityModeLabel
text: catalog.i18nc("@label", "Compatibility Mode") text: catalog.i18nc("@label", "Compatibility Mode")
font: UM.Theme.getFont("default")
color: UM.Theme.getColor("text")
visible: UM.SimulationView.compatibilityMode visible: UM.SimulationView.compatibilityMode
height: UM.Theme.getSize("layerview_row").height height: UM.Theme.getSize("layerview_row").height
width: parent.width width: parent.width
renderType: Text.NativeRendering
} }
Item // Spacer Item // Spacer
@ -213,12 +205,11 @@ Cura.ExpandableComponent
border.color: UM.Theme.getColor("lining") border.color: UM.Theme.getColor("lining")
} }
Label UM.Label
{ {
text: model.name text: model.name
elide: Text.ElideRight elide: Text.ElideRight
color: UM.Theme.getColor("setting_control_text") color: UM.Theme.getColor("setting_control_text")
font: UM.Theme.getFont("default")
anchors anchors
{ {
verticalCenter: parent.verticalCenter verticalCenter: parent.verticalCenter
@ -227,7 +218,6 @@ Cura.ExpandableComponent
leftMargin: UM.Theme.getSize("checkbox").width + Math.round(UM.Theme.getSize("default_margin").width / 2) leftMargin: UM.Theme.getSize("checkbox").width + Math.round(UM.Theme.getSize("default_margin").width / 2)
rightMargin: UM.Theme.getSize("default_margin").width * 2 rightMargin: UM.Theme.getSize("default_margin").width * 2
} }
renderType: Text.NativeRendering
} }
} }
} }
@ -347,7 +337,7 @@ Cura.ExpandableComponent
} }
} }
Label UM.Label
{ {
text: label text: label
visible: viewSettings.show_legend visible: viewSettings.show_legend
@ -356,8 +346,6 @@ Cura.ExpandableComponent
height: UM.Theme.getSize("layerview_row").height + UM.Theme.getSize("default_lining").height height: UM.Theme.getSize("layerview_row").height + UM.Theme.getSize("default_lining").height
width: parent.width width: parent.width
color: UM.Theme.getColor("setting_control_text") color: UM.Theme.getColor("setting_control_text")
font: UM.Theme.getFont("default")
renderType: Text.NativeRendering
Rectangle Rectangle
{ {
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
@ -382,7 +370,7 @@ Cura.ExpandableComponent
width: parent.width width: parent.width
height: UM.Theme.getSize("layerview_row").height height: UM.Theme.getSize("layerview_row").height
Label //Minimum value. UM.Label //Minimum value.
{ {
text: text:
{ {
@ -413,12 +401,9 @@ Cura.ExpandableComponent
return catalog.i18nc("@label","min") return catalog.i18nc("@label","min")
} }
anchors.left: parent.left anchors.left: parent.left
color: UM.Theme.getColor("setting_control_text")
font: UM.Theme.getFont("default")
renderType: Text.NativeRendering
} }
Label //Unit in the middle. UM.Label //Unit in the middle.
{ {
text: text:
{ {
@ -450,10 +435,9 @@ Cura.ExpandableComponent
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
color: UM.Theme.getColor("setting_control_text") color: UM.Theme.getColor("setting_control_text")
font: UM.Theme.getFont("default")
} }
Label //Maximum value. UM.Label //Maximum value.
{ {
text: { text: {
if (UM.SimulationView.layerActivity && CuraApplication.platformActivity) if (UM.SimulationView.layerActivity && CuraApplication.platformActivity)
@ -484,7 +468,6 @@ Cura.ExpandableComponent
anchors.right: parent.right anchors.right: parent.right
color: UM.Theme.getColor("setting_control_text") color: UM.Theme.getColor("setting_control_text")
font: UM.Theme.getFont("default")
} }
} }

View file

@ -4,7 +4,7 @@
import QtQuick 2.2 import QtQuick 2.2
import QtQuick.Controls 1.4 import QtQuick.Controls 1.4
import QtQuick.Controls.Styles 1.4 import QtQuick.Controls.Styles 1.4
import UM 1.1 as UM import UM 1.5 as UM
ButtonStyle ButtonStyle
{ {
@ -19,11 +19,9 @@ ButtonStyle
color: UM.Theme.getColor("lining") color: UM.Theme.getColor("lining")
} }
} }
label: Label label: UM.Label
{ {
text: control.text text: control.text
color: UM.Theme.getColor("text")
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
} }
} }

View file

@ -27,7 +27,7 @@ Item
// 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.
height: visible ? heading.height + table.height: 0 height: visible ? heading.height + table.height: 0
Label UM.Label
{ {
id: heading id: heading
width: parent.width width: parent.width
@ -35,7 +35,6 @@ Item
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
color: UM.Theme.getColor("text_medium") color: UM.Theme.getColor("text_medium")
font: UM.Theme.getFont("medium") font: UM.Theme.getFont("medium")
renderType: Text.NativeRendering
} }
TableView TableView
@ -92,29 +91,25 @@ Item
itemDelegate: Item itemDelegate: Item
{ {
height: UM.Theme.getSize("toolbox_chart_row").height height: UM.Theme.getSize("toolbox_chart_row").height
Label UM.Label
{ {
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
elide: Text.ElideRight elide: Text.ElideRight
text: styleData.value || "" text: styleData.value || ""
color: UM.Theme.getColor("text_medium") color: UM.Theme.getColor("text_medium")
font: UM.Theme.getFont("default")
renderType: Text.NativeRendering
} }
} }
Component Component
{ {
id: columnTextDelegate id: columnTextDelegate
Label UM.Label
{ {
anchors.fill: parent anchors.fill: parent
verticalAlignment: Text.AlignVCenter
text: styleData.value || "" text: styleData.value || ""
elide: Text.ElideRight elide: Text.ElideRight
color: UM.Theme.getColor("text_medium") color: UM.Theme.getColor("text_medium")
font: UM.Theme.getFont("default")
renderType: Text.NativeRendering
} }
} }
@ -152,7 +147,7 @@ Item
} }
} }
Label UM.Label
{ {
id: dataSheetLinks id: dataSheetLinks
anchors.top: compatibilityItem.bottom anchors.top: compatibilityItem.bottom
@ -200,10 +195,6 @@ Item
return result return result
} }
font: UM.Theme.getFont("default")
color: UM.Theme.getColor("text")
linkColor: UM.Theme.getColor("text_link")
onLinkActivated: UM.UrlUtil.openUrl(link, ["http", "https"]) onLinkActivated: UM.UrlUtil.openUrl(link, ["http", "https"])
renderType: Text.NativeRendering
} }
} }

View file

@ -5,7 +5,7 @@ import QtQuick 2.10
import QtQuick.Controls 1.4 import QtQuick.Controls 1.4
import QtQuick.Controls.Styles 1.4 import QtQuick.Controls.Styles 1.4
import QtQuick.Layouts 1.3 import QtQuick.Layouts 1.3
import UM 1.1 as UM import UM 1.5 as UM
import Cura 1.1 as Cura import Cura 1.1 as Cura
Item Item
@ -98,27 +98,23 @@ Item
bottom: parent.bottom bottom: parent.bottom
} }
Label UM.Label
{ {
id: name id: name
text: model.name text: model.name
width: parent.width width: parent.width
elide: Text.ElideRight elide: Text.ElideRight
color: UM.Theme.getColor("text")
font: UM.Theme.getFont("default_bold") font: UM.Theme.getFont("default_bold")
} }
Label UM.Label
{ {
id: info id: info
text: model.description text: model.description
elide: Text.ElideRight elide: Text.ElideRight
width: parent.width width: parent.width
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
color: UM.Theme.getColor("text")
font: UM.Theme.getFont("default")
anchors.top: name.bottom anchors.top: name.bottom
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
verticalAlignment: Text.AlignVCenter
maximumLineCount: 2 maximumLineCount: 2
} }
} }

View file

@ -5,7 +5,7 @@ import QtQuick 2.10
import QtQuick.Controls 1.4 import QtQuick.Controls 1.4
import QtQuick.Controls.Styles 1.4 import QtQuick.Controls.Styles 1.4
import UM 1.1 as UM import UM 1.5 as UM
Rectangle Rectangle
{ {
@ -34,7 +34,7 @@ Rectangle
horizontalCenter: parent.horizontalCenter horizontalCenter: parent.horizontalCenter
} }
} }
Label UM.Label
{ {
id: packageName id: packageName
text: model.name text: model.name
@ -43,15 +43,12 @@ Rectangle
horizontalCenter: parent.horizontalCenter horizontalCenter: parent.horizontalCenter
top: thumbnail.bottom top: thumbnail.bottom
} }
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
renderType: Text.NativeRendering
height: UM.Theme.getSize("toolbox_heading_label").height height: UM.Theme.getSize("toolbox_heading_label").height
width: parent.width - UM.Theme.getSize("default_margin").width width: parent.width - UM.Theme.getSize("default_margin").width
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
elide: Text.ElideRight elide: Text.ElideRight
font: UM.Theme.getFont("medium_bold") font: UM.Theme.getFont("medium_bold")
color: UM.Theme.getColor("text")
} }
UM.RecolorImage UM.RecolorImage
{ {

View file

@ -4,7 +4,7 @@
import QtQuick 2.10 import QtQuick 2.10
import QtQuick.Controls 2.3 import QtQuick.Controls 2.3
import UM 1.1 as UM import UM 1.5 as UM
import Cura 1.0 as Cura import Cura 1.0 as Cura
Item Item
@ -14,12 +14,10 @@ Item
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
height: visible ? UM.Theme.getSize("toolbox_footer").height : 0 height: visible ? UM.Theme.getSize("toolbox_footer").height : 0
Label UM.Label
{ {
text: catalog.i18nc("@info", "You will need to restart Cura before changes in packages have effect.") text: catalog.i18nc("@info", "You will need to restart Cura before changes in packages have effect.")
color: UM.Theme.getColor("text")
height: UM.Theme.getSize("toolbox_footer_button").height height: UM.Theme.getSize("toolbox_footer_button").height
verticalAlignment: Text.AlignVCenter
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
anchors anchors
{ {
@ -29,7 +27,6 @@ Item
right: restartButton.left right: restartButton.left
rightMargin: UM.Theme.getSize("default_margin").width rightMargin: UM.Theme.getSize("default_margin").width
} }
renderType: Text.NativeRendering
} }
Cura.PrimaryButton Cura.PrimaryButton

View file

@ -72,7 +72,7 @@ Item
id: authorInfo id: authorInfo
width: Math.floor(UM.Theme.getSize("toolbox_action_button").width * 1.25) width: Math.floor(UM.Theme.getSize("toolbox_action_button").width * 1.25)
Label UM.Label
{ {
text: text:
{ {
@ -89,24 +89,18 @@ Item
width: parent.width width: parent.width
height: Math.floor(UM.Theme.getSize("toolbox_property_label").height) height: Math.floor(UM.Theme.getSize("toolbox_property_label").height)
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignLeft horizontalAlignment: Text.AlignLeft
onLinkActivated: Qt.openUrlExternally("mailto:" + model.author_email + "?Subject=Cura: " + model.name + " Plugin") onLinkActivated: Qt.openUrlExternally("mailto:" + model.author_email + "?Subject=Cura: " + model.name + " Plugin")
color: model.enabled ? UM.Theme.getColor("text") : UM.Theme.getColor("lining") color: model.enabled ? UM.Theme.getColor("text") : UM.Theme.getColor("lining")
linkColor: UM.Theme.getColor("text_link")
renderType: Text.NativeRendering
} }
Label UM.Label
{ {
text: model.version text: model.version
font: UM.Theme.getFont("default")
width: parent.width width: parent.width
height: UM.Theme.getSize("toolbox_property_label").height height: UM.Theme.getSize("toolbox_property_label").height
color: UM.Theme.getColor("text")
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignLeft horizontalAlignment: Text.AlignLeft
renderType: Text.NativeRendering
} }
} }
ToolboxInstalledTileActions ToolboxInstalledTileActions

View file

@ -3,7 +3,7 @@
import QtQuick 2.10 import QtQuick 2.10
import QtQuick.Controls 2.3 import QtQuick.Controls 2.3
import UM 1.1 as UM import UM 1.5 as UM
Button Button
{ {
@ -28,17 +28,14 @@ Button
} }
} }
contentItem: Label contentItem: UM.Label
{ {
id: label id: label
text: control.text text: control.text
color: UM.Theme.getColor("toolbox_header_button_text_inactive") color: UM.Theme.getColor("toolbox_header_button_text_inactive")
font: UM.Theme.getFont("medium") font: UM.Theme.getFont("medium")
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
renderType: Text.NativeRendering
} }
states: states:

View file

@ -5,7 +5,7 @@ import QtQuick 2.7
import QtQuick.Controls 2.1 import QtQuick.Controls 2.1
import QtQuick.Window 2.2 import QtQuick.Window 2.2
import UM 1.3 as UM import UM 1.5 as UM
import Cura 1.1 as Cura import Cura 1.1 as Cura
Column Column
@ -16,18 +16,14 @@ Column
height: childrenRect.height height: childrenRect.height
anchors.centerIn: parent anchors.centerIn: parent
Label UM.Label
{ {
id: welcomeTextLabel id: welcomeTextLabel
text: catalog.i18nc("@description", "Please sign in to get verified plugins and materials for Ultimaker Cura Enterprise") text: catalog.i18nc("@description", "Please sign in to get verified plugins and materials for Ultimaker Cura Enterprise")
width: Math.round(parent.width / 2) width: Math.round(parent.width / 2)
font: UM.Theme.getFont("default")
color: UM.Theme.getColor("text")
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
wrapMode: Label.WordWrap wrapMode: Label.WordWrap
renderType: Text.NativeRendering
} }
Cura.PrimaryButton Cura.PrimaryButton

View file

@ -3,7 +3,7 @@
import QtQuick 2.2 import QtQuick 2.2
import QtQuick.Controls 2.0 import QtQuick.Controls 2.0
import UM 1.3 as UM import UM 1.5 as UM
/** /**
* This component comprises a buildplate icon and the buildplate name. It is * This component comprises a buildplate icon and the buildplate name. It is
@ -57,19 +57,15 @@ Item
} }
} }
Label UM.Label
{ {
id: buildplateLabel id: buildplateLabel
color: UM.Theme.getColor("text")
elide: Text.ElideRight elide: Text.ElideRight
font: UM.Theme.getFont("default") // 12pt, regular
text: buildplate ? buildplate : "" text: buildplate ? buildplate : ""
visible: text !== "" visible: text !== ""
// FIXED-LINE-HEIGHT: // FIXED-LINE-HEIGHT:
height: 18 * screenScaleFactor // TODO: Theme! height: 18 * screenScaleFactor // TODO: Theme!
verticalAlignment: Text.AlignVCenter
renderType: Text.NativeRendering
} }
} }
} }

View file

@ -5,7 +5,7 @@ import QtQuick 2.3
import QtQuick.Controls 1.4 import QtQuick.Controls 1.4
import QtQuick.Layouts 1.3 import QtQuick.Layouts 1.3
import QtQuick.Dialogs 1.2 import QtQuick.Dialogs 1.2
import UM 1.3 as UM import UM 1.5 as UM
UM.Dialog UM.Dialog
{ {
@ -63,7 +63,7 @@ UM.Dialog
} }
] ]
Label UM.Label
{ {
anchors anchors
{ {
@ -72,7 +72,6 @@ UM.Dialog
bottomMargin: 56 * screenScaleFactor // TODO: Theme! bottomMargin: 56 * screenScaleFactor // TODO: Theme!
} }
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
renderType: Text.NativeRendering
text: text:
{ {
if (!printer || !printer.activePrintJob) if (!printer || !printer.activePrintJob)

View file

@ -3,7 +3,7 @@
import QtQuick 2.3 import QtQuick 2.3
import QtQuick.Controls 2.0 import QtQuick.Controls 2.0
import UM 1.3 as UM import UM 1.5 as UM
import Cura 1.0 as Cura import Cura 1.0 as Cura
Button Button
@ -17,13 +17,12 @@ Button
radius: Math.round(0.5 * width) radius: Math.round(0.5 * width)
width: base.width width: base.width
} }
contentItem: Label { contentItem: UM.Label
{
color: enabled ? UM.Theme.getColor("text") : UM.Theme.getColor("monitor_text_disabled") color: enabled ? UM.Theme.getColor("text") : UM.Theme.getColor("monitor_text_disabled")
font.pixelSize: 32 * screenScaleFactor font.pixelSize: 32 * screenScaleFactor
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
text: base.text text: base.text
verticalAlignment: Text.AlignVCenter
renderType: Text.NativeRendering;
} }
height: width height: width
hoverEnabled: enabled hoverEnabled: enabled

View file

@ -3,7 +3,7 @@
import QtQuick 2.2 import QtQuick 2.2
import QtQuick.Controls 2.0 import QtQuick.Controls 2.0
import UM 1.3 as UM import UM 1.5 as UM
/** /**
* This component is a sort of "super icon" which includes a colored SVG image * This component is a sort of "super icon" which includes a colored SVG image
@ -35,18 +35,16 @@ Item
width: size width: size
} }
Label UM.Label
{ {
id: positionLabel id: positionLabel
anchors.centerIn: icon anchors.centerIn: icon
font: UM.Theme.getFont("small") font: UM.Theme.getFont("small")
color: UM.Theme.getColor("text")
height: Math.round(size / 2) height: Math.round(size / 2)
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
text: position + 1 text: position + 1
verticalAlignment: Text.AlignVCenter
width: Math.round(size / 2) width: Math.round(size / 2)
visible: position >= 0 visible: position >= 0
renderType: Text.NativeRendering
} }
} }

View file

@ -2,7 +2,7 @@
// Cura is released under the terms of the LGPLv3 or higher. // Cura is released under the terms of the LGPLv3 or higher.
import QtQuick 2.2 import QtQuick 2.2
import QtQuick.Controls 2.0 import QtQuick.Controls 2.0
import UM 1.3 as UM import UM 1.5 as UM
import Cura 1.0 as Cura import Cura 1.0 as Cura
/** /**
@ -55,10 +55,9 @@ Item
visible: !printJob visible: !printJob
radius: 2 * screenScaleFactor // TODO: Theme! radius: 2 * screenScaleFactor // TODO: Theme!
} }
Label UM.Label
{ {
text: printJob && printJob.name ? printJob.name : "" text: printJob && printJob.name ? printJob.name : ""
color: UM.Theme.getColor("text")
elide: Text.ElideRight elide: Text.ElideRight
font: UM.Theme.getFont("medium") // 14pt, regular font: UM.Theme.getFont("medium") // 14pt, regular
visible: printJob visible: printJob
@ -66,8 +65,6 @@ Item
// FIXED-LINE-HEIGHT: // FIXED-LINE-HEIGHT:
width: parent.width width: parent.width
height: parent.height height: parent.height
verticalAlignment: Text.AlignVCenter
renderType: Text.NativeRendering
} }
} }
@ -86,18 +83,15 @@ Item
radius: 2 * screenScaleFactor // TODO: Theme! radius: 2 * screenScaleFactor // TODO: Theme!
} }
Label UM.Label
{ {
text: printJob ? OutputDevice.formatDuration(printJob.timeTotal) : "" text: printJob ? OutputDevice.formatDuration(printJob.timeTotal) : ""
color: UM.Theme.getColor("text")
elide: Text.ElideRight elide: Text.ElideRight
font: UM.Theme.getFont("medium") // 14pt, regular font: UM.Theme.getFont("medium") // 14pt, regular
visible: printJob visible: printJob
// FIXED-LINE-HEIGHT: // FIXED-LINE-HEIGHT:
height: Math.round(18 * screenScaleFactor) // TODO: Theme! height: Math.round(18 * screenScaleFactor) // TODO: Theme!
verticalAlignment: Text.AlignVCenter
renderType: Text.NativeRendering
} }
} }
@ -116,11 +110,10 @@ Item
radius: 2 * screenScaleFactor // TODO: Theme! radius: 2 * screenScaleFactor // TODO: Theme!
} }
Label UM.Label
{ {
id: printerAssignmentLabel id: printerAssignmentLabel
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
color: UM.Theme.getColor("text")
elide: Text.ElideRight elide: Text.ElideRight
font: UM.Theme.getFont("medium") // 14pt, regular font: UM.Theme.getFont("medium") // 14pt, regular
text: { text: {
@ -143,8 +136,6 @@ Item
// FIXED-LINE-HEIGHT: // FIXED-LINE-HEIGHT:
height: parent.height height: parent.height
verticalAlignment: Text.AlignVCenter
renderType: Text.NativeRendering
} }
Row Row
@ -186,17 +177,15 @@ Item
height: Math.round(72 * screenScaleFactor) // TODO: Theme! height: Math.round(72 * screenScaleFactor) // TODO: Theme!
} }
Label { UM.Label
{
text: printJob && printJob.owner ? printJob.owner : "" text: printJob && printJob.owner ? printJob.owner : ""
color: UM.Theme.getColor("text")
elide: Text.ElideRight elide: Text.ElideRight
font: UM.Theme.getFont("medium") // 14pt, regular font: UM.Theme.getFont("medium") // 14pt, regular
anchors.top: printerConfiguration.top anchors.top: printerConfiguration.top
// FIXED-LINE-HEIGHT: // FIXED-LINE-HEIGHT:
height: Math.round(18 * screenScaleFactor) // TODO: Theme! height: Math.round(18 * screenScaleFactor) // TODO: Theme!
verticalAlignment: Text.AlignVCenter
renderType: Text.NativeRendering
} }
} }
} }

View file

@ -4,7 +4,7 @@
import QtQuick 2.3 import QtQuick 2.3
import QtQuick.Controls.Styles 1.3 import QtQuick.Controls.Styles 1.3
import QtQuick.Controls 1.4 import QtQuick.Controls 1.4
import UM 1.3 as UM import UM 1.5 as UM
/** /**
* NOTE: For most labels, a fixed height with vertical alignment is used to make * NOTE: For most labels, a fixed height with vertical alignment is used to make
@ -34,7 +34,7 @@ Item
width: UM.Theme.getSize("monitor_progress_bar").width width: UM.Theme.getSize("monitor_progress_bar").width
} }
Label UM.Label
{ {
id: percentLabel id: percentLabel
anchors anchors
@ -46,14 +46,11 @@ Item
text: printJob ? Math.round(printJob.progress * 100) + "%" : "0%" text: printJob ? Math.round(printJob.progress * 100) + "%" : "0%"
color: printJob && printJob.isActive ? UM.Theme.getColor("text") : UM.Theme.getColor("monitor_text_disabled") color: printJob && printJob.isActive ? UM.Theme.getColor("text") : UM.Theme.getColor("monitor_text_disabled")
width: contentWidth width: contentWidth
font: UM.Theme.getFont("default") // 12pt, regular
// FIXED-LINE-HEIGHT: // FIXED-LINE-HEIGHT:
height: UM.Theme.getSize("monitor_text_line").height height: UM.Theme.getSize("monitor_text_line").height
verticalAlignment: Text.AlignVCenter
renderType: Text.NativeRendering
} }
Label UM.Label
{ {
id: statusLabel id: statusLabel
anchors anchors
@ -62,8 +59,6 @@ Item
leftMargin: UM.Theme.getSize("monitor_margin").width leftMargin: UM.Theme.getSize("monitor_margin").width
verticalCenter: parent.verticalCenter verticalCenter: parent.verticalCenter
} }
color: UM.Theme.getColor("text")
font: UM.Theme.getFont("default")
text: text:
{ {
if (!printJob) if (!printJob)
@ -104,7 +99,5 @@ Item
// FIXED-LINE-HEIGHT: // FIXED-LINE-HEIGHT:
height: UM.Theme.getSize("monitor_text_line").height height: UM.Theme.getSize("monitor_text_line").height
verticalAlignment: Text.AlignVCenter
renderType: Text.NativeRendering
} }
} }

View file

@ -4,7 +4,7 @@
import QtQuick 2.3 import QtQuick 2.3
import QtQuick.Controls 2.0 import QtQuick.Controls 2.0
import QtQuick.Dialogs 1.1 import QtQuick.Dialogs 1.1
import UM 1.3 as UM import UM 1.5 as UM
import Cura 1.0 as Cura import Cura 1.0 as Cura
/** /**
@ -100,10 +100,9 @@ Item
width: parent.width width: parent.width
radius: 2 * screenScaleFactor // TODO: Theme! radius: 2 * screenScaleFactor // TODO: Theme!
Label UM.Label
{ {
text: printer && printer.name ? printer.name : "" text: printer && printer.name ? printer.name : ""
color: UM.Theme.getColor("text")
elide: Text.ElideRight elide: Text.ElideRight
font: UM.Theme.getFont("large") // 16pt, bold font: UM.Theme.getFont("large") // 16pt, bold
width: parent.width width: parent.width
@ -111,8 +110,6 @@ Item
// FIXED-LINE-HEIGHT: // FIXED-LINE-HEIGHT:
height: parent.height height: parent.height
verticalAlignment: Text.AlignVCenter
renderType: Text.NativeRendering
} }
} }
@ -138,21 +135,20 @@ Item
Item Item
{ {
id: managePrinterLink id: managePrinterLink
anchors { anchors
{
top: printerFamilyPill.bottom top: printerFamilyPill.bottom
topMargin: UM.Theme.getSize("narrow_margin").height topMargin: UM.Theme.getSize("narrow_margin").height
} }
height: 18 * screenScaleFactor // TODO: Theme! height: 18 * screenScaleFactor // TODO: Theme!
width: childrenRect.width width: childrenRect.width
Label UM.Label
{ {
id: managePrinterText id: managePrinterText
anchors.verticalCenter: managePrinterLink.verticalCenter anchors.verticalCenter: managePrinterLink.verticalCenter
color: UM.Theme.getColor("text_link") color: UM.Theme.getColor("text_link")
font: UM.Theme.getFont("default")
text: catalog.i18nc("@label link to Connect and Cloud interfaces", "Manage printer") text: catalog.i18nc("@label link to Connect and Cloud interfaces", "Manage printer")
renderType: Text.NativeRendering
} }
UM.RecolorImage UM.RecolorImage
{ {
@ -334,7 +330,7 @@ Item
height: childrenRect.height height: childrenRect.height
spacing: 18 * screenScaleFactor // TODO: Theme! spacing: 18 * screenScaleFactor // TODO: Theme!
Label UM.Label
{ {
id: printerStatus id: printerStatus
anchors anchors
@ -371,7 +367,6 @@ Item
return "" return ""
} }
visible: text !== "" visible: text !== ""
renderType: Text.NativeRendering
} }
Item Item
@ -401,7 +396,7 @@ Item
height: printerNameLabel.height + printerFamilyPill.height + 6 * screenScaleFactor // TODO: Theme! height: printerNameLabel.height + printerFamilyPill.height + 6 * screenScaleFactor // TODO: Theme!
visible: printer && printer.activePrintJob && !printerStatus.visible visible: printer && printer.activePrintJob && !printerStatus.visible
Label UM.Label
{ {
id: printerJobNameLabel id: printerJobNameLabel
color: printer && printer.activePrintJob && printer.activePrintJob.isActive ? UM.Theme.getColor("text") : UM.Theme.getColor("monitor_text_disabled") color: printer && printer.activePrintJob && printer.activePrintJob.isActive ? UM.Theme.getColor("text") : UM.Theme.getColor("monitor_text_disabled")
@ -412,11 +407,9 @@ Item
// FIXED-LINE-HEIGHT: // FIXED-LINE-HEIGHT:
height: 18 * screenScaleFactor // TODO: Theme! height: 18 * screenScaleFactor // TODO: Theme!
verticalAlignment: Text.AlignVCenter
renderType: Text.NativeRendering
} }
Label UM.Label
{ {
id: printerJobOwnerLabel id: printerJobOwnerLabel
anchors anchors
@ -427,14 +420,11 @@ Item
} }
color: printer && printer.activePrintJob && printer.activePrintJob.isActive ? UM.Theme.getColor("text") : UM.Theme.getColor("monitor_text_disabled") color: printer && printer.activePrintJob && printer.activePrintJob.isActive ? UM.Theme.getColor("text") : UM.Theme.getColor("monitor_text_disabled")
elide: Text.ElideRight elide: Text.ElideRight
font: UM.Theme.getFont("default") // 12pt, regular
text: printer && printer.activePrintJob ? printer.activePrintJob.owner : catalog.i18nc("@label", "Anonymous") text: printer && printer.activePrintJob ? printer.activePrintJob.owner : catalog.i18nc("@label", "Anonymous")
width: parent.width width: parent.width
// FIXED-LINE-HEIGHT: // FIXED-LINE-HEIGHT:
height: 18 * screenScaleFactor // TODO: Theme! height: 18 * screenScaleFactor // TODO: Theme!
verticalAlignment: Text.AlignVCenter
renderType: Text.NativeRendering
} }
} }
@ -448,21 +438,17 @@ Item
visible: printer && printer.activePrintJob && printer.activePrintJob.configurationChanges.length === 0 && !printerStatus.visible visible: printer && printer.activePrintJob && printer.activePrintJob.configurationChanges.length === 0 && !printerStatus.visible
} }
Label UM.Label
{ {
anchors anchors
{ {
verticalCenter: parent.verticalCenter verticalCenter: parent.verticalCenter
} }
font: UM.Theme.getFont("default")
text: catalog.i18nc("@label:status", "Requires configuration changes") text: catalog.i18nc("@label:status", "Requires configuration changes")
visible: printer && printer.activePrintJob && printer.activePrintJob.configurationChanges.length > 0 && !printerStatus.visible visible: printer && printer.activePrintJob && printer.activePrintJob.configurationChanges.length > 0 && !printerStatus.visible
color: UM.Theme.getColor("text")
// FIXED-LINE-HEIGHT: // FIXED-LINE-HEIGHT:
height: 18 * screenScaleFactor // TODO: Theme! height: 18 * screenScaleFactor // TODO: Theme!
verticalAlignment: Text.AlignVCenter
renderType: Text.NativeRendering
} }
} }
@ -487,17 +473,15 @@ Item
radius: 2 * screenScaleFactor // Todo: Theme! radius: 2 * screenScaleFactor // Todo: Theme!
} }
} }
contentItem: Label contentItem: UM.Label
{ {
anchors.fill: parent anchors.fill: parent
anchors.bottomMargin: 2 * screenScaleFactor // TODO: Theme! anchors.bottomMargin: 2 * screenScaleFactor // TODO: Theme!
color: UM.Theme.getColor("monitor_secondary_button_text") color: UM.Theme.getColor("monitor_secondary_button_text")
font: UM.Theme.getFont("medium") // 14pt, regular font: UM.Theme.getFont("medium") // 14pt, regular
text: catalog.i18nc("@action:button", "Details"); text: catalog.i18nc("@action:button", "Details");
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
height: 18 * screenScaleFactor // TODO: Theme! height: 18 * screenScaleFactor // TODO: Theme!
renderType: Text.NativeRendering
} }
implicitHeight: 32 * screenScaleFactor // TODO: Theme! implicitHeight: 32 * screenScaleFactor // TODO: Theme!
implicitWidth: 96 * screenScaleFactor // TODO: Theme! implicitWidth: 96 * screenScaleFactor // TODO: Theme!

View file

@ -1,24 +1,25 @@
// Copyright (c) 2019 Ultimaker B.V. // Copyright (c) 2021 Ultimaker B.V.
// Cura is released under the terms of the LGPLv3 or higher. // Cura is released under the terms of the LGPLv3 or higher.
import QtQuick 2.2 import QtQuick 2.2
import QtQuick.Controls 2.0 import QtQuick.Controls 2.0
import QtQuick.Controls.Styles 1.4 import QtQuick.Controls.Styles 1.4
import UM 1.3 as UM import UM 1.5 as UM
Button { Button
background: Rectangle { {
opacity: parent.down || parent.hovered ? 1 : 0; background: Rectangle
{
opacity: parent.down || parent.hovered ? 1 : 0
color: UM.Theme.getColor("monitor_context_menu_hover") color: UM.Theme.getColor("monitor_context_menu_hover")
} }
contentItem: Label { contentItem: UM.Label
color: enabled ? UM.Theme.getColor("text") : UM.Theme.getColor("monitor_text_disabled"); {
color: enabled ? UM.Theme.getColor("text") : UM.Theme.getColor("monitor_text_disabled")
text: parent.text text: parent.text
horizontalAlignment: Text.AlignLeft; horizontalAlignment: Text.AlignLeft
verticalAlignment: Text.AlignVCenter;
renderType: Text.NativeRendering;
} }
height: visible ? 39 * screenScaleFactor : 0; // TODO: Theme! height: visible ? 39 * screenScaleFactor : 0 // TODO: Theme!
hoverEnabled: true; hoverEnabled: true
width: parent.width; width: parent.width
} }

View file

@ -4,7 +4,7 @@
import QtQuick 2.10 import QtQuick 2.10
import QtQuick.Controls 2.3 import QtQuick.Controls 2.3
import UM 1.4 as UM import UM 1.5 as UM
import Cura 1.1 as Cura import Cura 1.1 as Cura
Item Item
@ -46,15 +46,12 @@ Item
} }
} }
contentItem: Label contentItem: UM.Label
{ {
id: label id: label
text: signInButton.text text: signInButton.text
font: UM.Theme.getFont("default")
color: UM.Theme.getColor("primary_text") color: UM.Theme.getColor("primary_text")
width: contentWidth width: contentWidth
verticalAlignment: Text.AlignVCenter
renderType: Text.NativeRendering
} }
} }
@ -113,7 +110,7 @@ Item
} }
} }
Label UM.Label
{ {
id: initialLabel id: initialLabel
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
@ -121,9 +118,7 @@ Item
text: accountWidget.text text: accountWidget.text
font: UM.Theme.getFont("large_bold") font: UM.Theme.getFont("large_bold")
color: UM.Theme.getColor("primary_text") color: UM.Theme.getColor("primary_text")
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
renderType: Text.NativeRendering
} }
} }

View file

@ -4,7 +4,7 @@
import QtQuick 2.10 import QtQuick 2.10
import QtQuick.Controls 2.3 import QtQuick.Controls 2.3
import UM 1.4 as UM import UM 1.5 as UM
import Cura 1.1 as Cura import Cura 1.1 as Cura
Column Column
@ -12,14 +12,12 @@ Column
spacing: UM.Theme.getSize("default_margin").width spacing: UM.Theme.getSize("default_margin").width
padding: UM.Theme.getSize("default_margin").width padding: UM.Theme.getSize("default_margin").width
Label UM.Label
{ {
id: title id: title
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
renderType: Text.NativeRendering
text: catalog.i18nc("@label", "Sign in to the Ultimaker platform") text: catalog.i18nc("@label", "Sign in to the Ultimaker platform")
font: UM.Theme.getFont("large_bold") font: UM.Theme.getFont("large_bold")
color: UM.Theme.getColor("text")
} }
Image Image
@ -33,16 +31,13 @@ Column
verticalAlignment: Image.AlignVCenter verticalAlignment: Image.AlignVCenter
} }
Label UM.Label
{ {
id: generalInformationPoints id: generalInformationPoints
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
horizontalAlignment: Text.AlignLeft horizontalAlignment: Text.AlignLeft
renderType: Text.NativeRendering
text: catalog.i18nc("@text", "- Add material profiles and plug-ins from the Marketplace\n- Back-up and sync your material profiles and plug-ins\n- Share ideas and get help from 48,000+ users in the Ultimaker community") text: catalog.i18nc("@text", "- Add material profiles and plug-ins from the Marketplace\n- Back-up and sync your material profiles and plug-ins\n- Share ideas and get help from 48,000+ users in the Ultimaker community")
lineHeight: 1.4 lineHeight: 1.4
font: UM.Theme.getFont("default")
color: UM.Theme.getColor("text")
} }
Cura.PrimaryButton Cura.PrimaryButton

View file

@ -1,7 +1,7 @@
import QtQuick 2.10 import QtQuick 2.10
import QtQuick.Controls 2.3 import QtQuick.Controls 2.3
import UM 1.4 as UM import UM 1.5 as UM
import Cura 1.1 as Cura import Cura 1.1 as Cura
Row // Sync state icon + message Row // Sync state icon + message
@ -77,27 +77,22 @@ Row // Sync state icon + message
width: childrenRect.width width: childrenRect.width
height: childrenRect.height height: childrenRect.height
Label UM.Label
{ {
id: stateLabel id: stateLabel
// text is determined by State // text is determined by State
color: UM.Theme.getColor("text")
font: UM.Theme.getFont("medium") font: UM.Theme.getFont("medium")
renderType: Text.NativeRendering
width: contentWidth + UM.Theme.getSize("default_margin").height width: contentWidth + UM.Theme.getSize("default_margin").height
height: contentHeight height: contentHeight
verticalAlignment: Text.AlignVCenter
visible: !Cura.API.account.manualSyncEnabled && !Cura.API.account.updatePackagesEnabled visible: !Cura.API.account.manualSyncEnabled && !Cura.API.account.updatePackagesEnabled
} }
Label UM.Label
{ {
id: updatePackagesButton id: updatePackagesButton
text: catalog.i18nc("@button", "Install pending updates") text: catalog.i18nc("@button", "Install pending updates")
color: UM.Theme.getColor("text_link") color: UM.Theme.getColor("text_link")
font: UM.Theme.getFont("medium") font: UM.Theme.getFont("medium")
renderType: Text.NativeRendering
verticalAlignment: Text.AlignVCenter
height: contentHeight height: contentHeight
width: contentWidth + UM.Theme.getSize("default_margin").height width: contentWidth + UM.Theme.getSize("default_margin").height
visible: Cura.API.account.updatePackagesEnabled visible: Cura.API.account.updatePackagesEnabled
@ -112,14 +107,12 @@ Row // Sync state icon + message
} }
} }
Label UM.Label
{ {
id: accountSyncButton id: accountSyncButton
text: catalog.i18nc("@button", "Check for account updates") text: catalog.i18nc("@button", "Check for account updates")
color: UM.Theme.getColor("text_link") color: UM.Theme.getColor("text_link")
font: UM.Theme.getFont("medium") font: UM.Theme.getFont("medium")
renderType: Text.NativeRendering
verticalAlignment: Text.AlignVCenter
height: contentHeight height: contentHeight
width: contentWidth + UM.Theme.getSize("default_margin").height width: contentWidth + UM.Theme.getSize("default_margin").height
visible: Cura.API.account.manualSyncEnabled visible: Cura.API.account.manualSyncEnabled

View file

@ -4,7 +4,7 @@
import QtQuick 2.10 import QtQuick 2.10
import QtQuick.Controls 2.3 import QtQuick.Controls 2.3
import UM 1.4 as UM import UM 1.5 as UM
import Cura 1.1 as Cura import Cura 1.1 as Cura
Column Column
@ -41,16 +41,13 @@ Column
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
color: UM.Theme.getColor("action_button_disabled") color: UM.Theme.getColor("action_button_disabled")
visible: !avatar.hasAvatar visible: !avatar.hasAvatar
Label UM.Label
{ {
id: initialLabel id: initialLabel
anchors.centerIn: parent anchors.centerIn: parent
text: profile["username"].charAt(0).toUpperCase() text: profile["username"].charAt(0).toUpperCase()
font: UM.Theme.getFont("large_bold") font: UM.Theme.getFont("large_bold")
color: UM.Theme.getColor("text")
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
renderType: Text.NativeRendering
} }
} }
@ -62,25 +59,22 @@ Column
spacing: UM.Theme.getSize("narrow_margin").height spacing: UM.Theme.getSize("narrow_margin").height
width: childrenRect.width width: childrenRect.width
height: childrenRect.height height: childrenRect.height
Label
UM.Label
{ {
id: username id: username
renderType: Text.NativeRendering
text: profile.username text: profile.username
font: UM.Theme.getFont("large_bold") font: UM.Theme.getFont("large_bold")
color: UM.Theme.getColor("text")
} }
SyncState SyncState
{ {
id: syncRow id: syncRow
} }
Label UM.Label
{ {
id: lastSyncLabel id: lastSyncLabel
renderType: Text.NativeRendering
text: catalog.i18nc("@label The argument is a timestamp", "Last update: %1").arg(Cura.API.account.lastSyncDateTime) text: catalog.i18nc("@label The argument is a timestamp", "Last update: %1").arg(Cura.API.account.lastSyncDateTime)
font: UM.Theme.getFont("default")
color: UM.Theme.getColor("text_medium") color: UM.Theme.getColor("text_medium")
} }
} }

View file

@ -5,7 +5,7 @@ import QtQuick 2.7
import QtQuick.Controls 2.1 import QtQuick.Controls 2.1
import QtGraphicalEffects 1.0 // For the dropshadow import QtGraphicalEffects 1.0 // For the dropshadow
import UM 1.1 as UM import UM 1.5 as UM
import Cura 1.0 as Cura import Cura 1.0 as Cura
@ -127,18 +127,16 @@ Button
elideWidth: buttonText.width elideWidth: buttonText.width
} }
Label UM.Label
{ {
id: buttonText id: buttonText
text: button.text text: button.text
color: button.enabled ? (button.hovered ? button.textHoverColor : button.textColor): button.textDisabledColor color: button.enabled ? (button.hovered ? button.textHoverColor : button.textColor): button.textDisabledColor
font: UM.Theme.getFont("medium") font: UM.Theme.getFont("medium")
visible: text != "" visible: text != ""
renderType: Text.NativeRendering
height: parent.height height: parent.height
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
elide: Text.ElideRight elide: Text.ElideRight
Binding Binding

View file

@ -4,7 +4,7 @@
import QtQuick 2.10 import QtQuick 2.10
import QtQuick.Controls 2.3 import QtQuick.Controls 2.3
import UM 1.4 as UM import UM 1.5 as UM
import Cura 1.1 as Cura import Cura 1.1 as Cura
Button Button
@ -73,7 +73,7 @@ Button
} }
} }
Label UM.Label
{ {
id: applicationDisplayName id: applicationDisplayName
@ -82,10 +82,8 @@ Button
height: base.height - applicationIcon.height - 2 * UM.Theme.getSize("default_margin").width // Account for the top and bottom margins height: base.height - applicationIcon.height - 2 * UM.Theme.getSize("default_margin").width // Account for the top and bottom margins
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
wrapMode: Text.Wrap wrapMode: Text.Wrap
elide: Text.ElideRight elide: Text.ElideRight
color: UM.Theme.getColor("text")
} }
} }
} }

View file

@ -4,7 +4,7 @@
import QtQuick 2.7 import QtQuick 2.7
import QtQuick.Controls 2.1 import QtQuick.Controls 2.1
import UM 1.3 as UM import UM 1.5 as UM
CheckBox CheckBox
{ {
@ -38,7 +38,7 @@ CheckBox
} }
} }
contentItem: Label contentItem: UM.Label
{ {
anchors anchors
{ {
@ -47,10 +47,7 @@ CheckBox
} }
text: checkbox.text text: checkbox.text
color: UM.Theme.getColor("checkbox_text") color: UM.Theme.getColor("checkbox_text")
font: UM.Theme.getFont("default")
renderType: Text.NativeRendering
elide: Text.ElideRight elide: Text.ElideRight
verticalAlignment: Text.AlignVCenter
} }
ToolTip ToolTip

View file

@ -4,7 +4,7 @@
import QtQuick 2.7 import QtQuick 2.7
import QtQuick.Controls 2.3 import QtQuick.Controls 2.3
import UM 1.2 as UM import UM 1.5 as UM
import Cura 1.0 as Cura import Cura 1.0 as Cura
// The expandable component has 2 major sub components: // The expandable component has 2 major sub components:
@ -126,7 +126,7 @@ Item
color: base.enabled ? (base.expanded ? headerActiveColor : headerBackgroundColor) : UM.Theme.getColor("disabled") color: base.enabled ? (base.expanded ? headerActiveColor : headerBackgroundColor) : UM.Theme.getColor("disabled")
anchors.fill: parent anchors.fill: parent
Label UM.Label
{ {
id: disabledLabel id: disabledLabel
visible: !base.enabled visible: !base.enabled
@ -134,10 +134,6 @@ Item
leftPadding: background.padding leftPadding: background.padding
rightPadding: background.padding rightPadding: background.padding
text: "" text: ""
font: UM.Theme.getFont("default")
renderType: Text.NativeRendering
verticalAlignment: Text.AlignVCenter
color: UM.Theme.getColor("text")
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
} }

View file

@ -4,7 +4,7 @@
import QtQuick 2.7 import QtQuick 2.7
import QtQuick.Controls 2.3 import QtQuick.Controls 2.3
import UM 1.2 as UM import UM 1.5 as UM
import Cura 1.0 as Cura import Cura 1.0 as Cura
// Header of the popup // Header of the popup
@ -22,13 +22,11 @@ Cura.RoundedRectangle
border.color: UM.Theme.getColor("lining") border.color: UM.Theme.getColor("lining")
radius: UM.Theme.getSize("default_radius").width radius: UM.Theme.getSize("default_radius").width
Label UM.Label
{ {
id: headerLabel id: headerLabel
text: "" text: ""
font: UM.Theme.getFont("medium") font: UM.Theme.getFont("medium")
renderType: Text.NativeRendering
verticalAlignment: Text.AlignVCenter
color: UM.Theme.getColor("small_button_text") color: UM.Theme.getColor("small_button_text")
height: parent.height height: parent.height

View file

@ -4,7 +4,7 @@
import QtQuick 2.7 import QtQuick 2.7
import QtQuick.Controls 2.3 import QtQuick.Controls 2.3
import UM 1.2 as UM import UM 1.5 as UM
import Cura 1.0 as Cura import Cura 1.0 as Cura
// The expandable component has 2 major sub components: // The expandable component has 2 major sub components:
@ -120,16 +120,12 @@ Item
color: base.enabled ? headerBackgroundColor : UM.Theme.getColor("disabled") color: base.enabled ? headerBackgroundColor : UM.Theme.getColor("disabled")
anchors.fill: parent anchors.fill: parent
Label UM.Label
{ {
id: disabledLabel id: disabledLabel
visible: !base.enabled visible: !base.enabled
leftPadding: background.padding leftPadding: background.padding
text: "" text: ""
font: UM.Theme.getFont("default")
renderType: Text.NativeRendering
verticalAlignment: Text.AlignVCenter
color: UM.Theme.getColor("text")
height: parent.height height: parent.height
} }

View file

@ -2,8 +2,7 @@
// Cura is released under the terms of the LGPLv3 or higher. // Cura is released under the terms of the LGPLv3 or higher.
import QtQuick 2.11 import QtQuick 2.11
import QtQuick.Controls 1.1 import UM 1.5 as UM
import UM 1.2 as UM
Item Item
{ {
@ -43,18 +42,15 @@ Item
color: extruderNumberText.color color: extruderNumberText.color
} }
Label UM.Label
{ {
id: extruderNumberText id: extruderNumberText
anchors.centerIn: parent anchors.centerIn: parent
text: index + 1 text: index + 1
font: UM.Theme.getFont("small_emphasis") font: UM.Theme.getFont("small_emphasis")
color: UM.Theme.getColor("text")
width: contentWidth width: contentWidth
height: contentHeight height: contentHeight
renderType: Text.NativeRendering
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
} }
} }
} }

View file

@ -5,7 +5,7 @@ import QtQuick 2.7
import QtQuick.Controls 2.0 import QtQuick.Controls 2.0
import QtQuick.Layouts 1.3 import QtQuick.Layouts 1.3
import UM 1.2 as UM import UM 1.5 as UM
import Cura 1.0 as Cura import Cura 1.0 as Cura
// Reusable component that holds an (re-colorable) icon on the left with some text on the right. // Reusable component that holds an (re-colorable) icon on the left with some text on the right.
@ -49,15 +49,10 @@ Item
} }
} }
Label UM.Label
{ {
id: label id: label
font: UM.Theme.getFont("default")
color: UM.Theme.getColor("text")
renderType: Text.NativeRendering
elide: Text.ElideRight elide: Text.ElideRight
verticalAlignment: Text.AlignVCenter
anchors anchors
{ {
left: icon.right left: icon.right

View file

@ -6,7 +6,7 @@ import QtQuick.Controls 1.1
import QtQuick.Controls.Styles 1.1 import QtQuick.Controls.Styles 1.1
import QtQuick.Layouts 1.1 import QtQuick.Layouts 1.1
import UM 1.1 as UM import UM 1.5 as UM
import Cura 1.0 as Cura import Cura 1.0 as Cura
Item Item
@ -119,15 +119,13 @@ Item
} }
} }
Label UM.Label
{ {
id: boundingSpec id: boundingSpec
anchors.top: jobNameRow.bottom anchors.top: jobNameRow.bottom
anchors.left: parent.left anchors.left: parent.left
height: UM.Theme.getSize("jobspecs_line").height height: UM.Theme.getSize("jobspecs_line").height
verticalAlignment: Text.AlignVCenter
font: UM.Theme.getFont("default")
color: UM.Theme.getColor("text_scene") color: UM.Theme.getColor("text_scene")
text: CuraApplication.getSceneBoundingBoxString text: CuraApplication.getSceneBoundingBoxString
} }

View file

@ -4,7 +4,7 @@
import QtQuick 2.10 import QtQuick 2.10
import QtQuick.Controls 2.3 import QtQuick.Controls 2.3
import UM 1.3 as UM import UM 1.5 as UM
import Cura 1.1 as Cura import Cura 1.1 as Cura
@ -222,7 +222,7 @@ UM.TooltipArea
} }
} }
Label UM.Label
{ {
id: unitLabel id: unitLabel
anchors.right: parent.right anchors.right: parent.right
@ -230,10 +230,7 @@ UM.TooltipArea
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
text: unitText text: unitText
textFormat: Text.PlainText textFormat: Text.PlainText
verticalAlignment: Text.AlignVCenter
renderType: Text.NativeRendering
color: UM.Theme.getColor("setting_unit") color: UM.Theme.getColor("setting_unit")
font: UM.Theme.getFont("default")
} }
} }
} }

View file

@ -4,7 +4,7 @@
import QtQuick 2.7 import QtQuick 2.7
import QtQuick.Controls 2.4 import QtQuick.Controls 2.4
import UM 1.4 as UM import UM 1.5 as UM
import Cura 1.0 as Cura import Cura 1.0 as Cura
import "../Account" import "../Account"
@ -96,7 +96,7 @@ Item
} }
} }
contentItem: Label contentItem: UM.Label
{ {
id: buttonLabel id: buttonLabel
text: stageSelectorButton.text text: stageSelectorButton.text
@ -158,15 +158,12 @@ Item
} }
} }
contentItem: Label contentItem: UM.Label
{ {
id: label id: label
text: marketplaceButton.text text: marketplaceButton.text
font: UM.Theme.getFont("default")
color: UM.Theme.getColor("primary_text") color: UM.Theme.getColor("primary_text")
width: contentWidth width: contentWidth
verticalAlignment: Text.AlignVCenter
renderType: Text.NativeRendering
} }
anchors anchors

View file

@ -4,7 +4,7 @@
import QtQuick 2.7 import QtQuick 2.7
import QtQuick.Controls 2.0 import QtQuick.Controls 2.0
import UM 1.2 as UM import UM 1.5 as UM
import Cura 1.0 as Cura import Cura 1.0 as Cura
Button Button
@ -99,7 +99,7 @@ Button
height: width height: width
} }
Label UM.Label
{ {
id: unknownMaterialMessage id: unknownMaterialMessage
text: text:
@ -147,10 +147,6 @@ Button
anchors.top: unknownMaterial.top anchors.top: unknownMaterial.top
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
font: UM.Theme.getFont("default")
color: UM.Theme.getColor("text")
verticalAlignment: Text.AlignVCenter
linkColor: UM.Theme.getColor("text_link")
onLinkActivated: onLinkActivated:
{ {

View file

@ -19,14 +19,13 @@ Item
width: parent.width width: parent.width
height: childrenRect.height height: childrenRect.height
Label UM.Label
{ {
id: header id: header
text: catalog.i18nc("@header", "Custom") text: catalog.i18nc("@header", "Custom")
font: UM.Theme.getFont("medium") font: UM.Theme.getFont("medium")
color: UM.Theme.getColor("small_button_text") color: UM.Theme.getColor("small_button_text")
height: contentHeight height: contentHeight
renderType: Text.NativeRendering
anchors anchors
{ {
@ -56,13 +55,11 @@ Item
topMargin: visible ? UM.Theme.getSize("default_margin").height : 0 topMargin: visible ? UM.Theme.getSize("default_margin").height : 0
} }
Label UM.Label
{ {
text: catalog.i18nc("@label", "Printer") text: catalog.i18nc("@label", "Printer")
width: Math.round(parent.width * 0.3) - UM.Theme.getSize("default_margin").width width: Math.round(parent.width * 0.3) - UM.Theme.getSize("default_margin").width
height: contentHeight height: contentHeight
font: UM.Theme.getFont("default")
color: UM.Theme.getColor("text")
anchors.verticalCenter: printerTypeSelector.verticalCenter anchors.verticalCenter: printerTypeSelector.verticalCenter
anchors.left: parent.left anchors.left: parent.left
} }
@ -208,15 +205,11 @@ Item
height: visible ? UM.Theme.getSize("setting_control").height : 0 height: visible ? UM.Theme.getSize("setting_control").height : 0
visible: extrudersModel.count > 1 // If there is only one extruder, there is no point to enable/disable that. visible: extrudersModel.count > 1 // If there is only one extruder, there is no point to enable/disable that.
Label UM.Label
{ {
text: catalog.i18nc("@label", "Enabled") text: catalog.i18nc("@label", "Enabled")
verticalAlignment: Text.AlignVCenter
font: UM.Theme.getFont("default")
color: UM.Theme.getColor("text")
height: parent.height height: parent.height
width: selectors.textWidth width: selectors.textWidth
renderType: Text.NativeRendering
} }
UM.CheckBox UM.CheckBox
@ -261,15 +254,11 @@ Item
height: visible ? UM.Theme.getSize("print_setup_big_item").height : 0 height: visible ? UM.Theme.getSize("print_setup_big_item").height : 0
visible: Cura.MachineManager.activeMachine ? Cura.MachineManager.activeMachine.hasMaterials : false visible: Cura.MachineManager.activeMachine ? Cura.MachineManager.activeMachine.hasMaterials : false
Label UM.Label
{ {
text: catalog.i18nc("@label", "Material") text: catalog.i18nc("@label", "Material")
verticalAlignment: Text.AlignVCenter
font: UM.Theme.getFont("default")
color: UM.Theme.getColor("text")
height: parent.height height: parent.height
width: selectors.textWidth width: selectors.textWidth
renderType: Text.NativeRendering
} }
OldControls.ToolButton OldControls.ToolButton
@ -327,15 +316,11 @@ Item
height: visible ? UM.Theme.getSize("print_setup_big_item").height : 0 height: visible ? UM.Theme.getSize("print_setup_big_item").height : 0
visible: Cura.MachineManager.activeMachine ? Cura.MachineManager.activeMachine.hasVariants : false visible: Cura.MachineManager.activeMachine ? Cura.MachineManager.activeMachine.hasVariants : false
Label UM.Label
{ {
text: Cura.MachineManager.activeDefinitionVariantsName text: Cura.MachineManager.activeDefinitionVariantsName
verticalAlignment: Text.AlignVCenter
font: UM.Theme.getFont("default")
color: UM.Theme.getColor("text")
height: parent.height height: parent.height
width: selectors.textWidth width: selectors.textWidth
renderType: Text.NativeRendering
} }
OldControls.ToolButton OldControls.ToolButton
@ -371,11 +356,10 @@ Item
property bool buildplateCompatibilityWarning: Cura.MachineManager.variantBuildplateUsable property bool buildplateCompatibilityWarning: Cura.MachineManager.variantBuildplateUsable
// This is a space holder aligning the warning messages. // This is a space holder aligning the warning messages.
Label UM.Label
{ {
text: "" text: ""
width: selectors.textWidth width: selectors.textWidth
renderType: Text.NativeRendering
} }
Item Item
@ -396,19 +380,15 @@ Item
visible: !Cura.MachineManager.isCurrentSetupSupported || warnings.buildplateCompatibilityError || warnings.buildplateCompatibilityWarning visible: !Cura.MachineManager.isCurrentSetupSupported || warnings.buildplateCompatibilityError || warnings.buildplateCompatibilityWarning
} }
Label UM.Label
{ {
id: materialCompatibilityLabel id: materialCompatibilityLabel
anchors.left: warningImage.right anchors.left: warningImage.right
anchors.leftMargin: UM.Theme.getSize("default_margin").width anchors.leftMargin: UM.Theme.getSize("default_margin").width
verticalAlignment: Text.AlignVCenter
width: selectors.controlWidth - warningImage.width - UM.Theme.getSize("default_margin").width width: selectors.controlWidth - warningImage.width - UM.Theme.getSize("default_margin").width
text: catalog.i18nc("@label", "Use glue for better adhesion with this material combination.") text: catalog.i18nc("@label", "Use glue for better adhesion with this material combination.")
font: UM.Theme.getFont("default")
color: UM.Theme.getColor("text")
visible: CuraSDKVersion == "dev" ? false : warnings.buildplateCompatibilityError || warnings.buildplateCompatibilityWarning visible: CuraSDKVersion == "dev" ? false : warnings.buildplateCompatibilityError || warnings.buildplateCompatibilityWarning
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
renderType: Text.NativeRendering
} }
} }
} }

View file

@ -4,7 +4,7 @@
import QtQuick 2.7 import QtQuick 2.7
import QtQuick.Controls 2.0 import QtQuick.Controls 2.0
import UM 1.2 as UM import UM 1.5 as UM
import Cura 1.0 as Cura import Cura 1.0 as Cura
Item Item
@ -33,30 +33,24 @@ Item
margins: UM.Theme.getSize("default_margin").width margins: UM.Theme.getSize("default_margin").width
} }
Label UM.Label
{ {
text: (printCoreConfiguration !== null && printCoreConfiguration.material.brand) ? printCoreConfiguration.material.brand : " " //Use space so that the height is still correct. text: (printCoreConfiguration !== null && printCoreConfiguration.material.brand) ? printCoreConfiguration.material.brand : " " //Use space so that the height is still correct.
renderType: Text.NativeRendering
elide: Text.ElideRight elide: Text.ElideRight
font: UM.Theme.getFont("default")
color: UM.Theme.getColor("text_inactive") color: UM.Theme.getColor("text_inactive")
width: parent.width width: parent.width
} }
Label UM.Label
{ {
text: (printCoreConfiguration !== null && printCoreConfiguration.material.brand) ? printCoreConfiguration.material.name : " " //Use space so that the height is still correct. text: (printCoreConfiguration !== null && printCoreConfiguration.material.brand) ? printCoreConfiguration.material.name : " " //Use space so that the height is still correct.
renderType: Text.NativeRendering
elide: Text.ElideRight elide: Text.ElideRight
font: UM.Theme.getFont("medium") font: UM.Theme.getFont("medium")
color: UM.Theme.getColor("text")
width: parent.width width: parent.width
} }
Label UM.Label
{ {
text: (printCoreConfiguration !== null && printCoreConfiguration.hotendID) ? printCoreConfiguration.hotendID : " " //Use space so that the height is still correct. text: (printCoreConfiguration !== null && printCoreConfiguration.hotendID) ? printCoreConfiguration.hotendID : " " //Use space so that the height is still correct.
renderType: Text.NativeRendering
elide: Text.ElideRight elide: Text.ElideRight
font: UM.Theme.getFont("default")
color: UM.Theme.getColor("text_inactive") color: UM.Theme.getColor("text_inactive")
width: parent.width width: parent.width
} }

View file

@ -4,7 +4,7 @@
import QtQuick 2.10 import QtQuick 2.10
import QtQuick.Controls 2.3 import QtQuick.Controls 2.3
import UM 1.1 as UM import UM 1.5 as UM
import Cura 1.0 as Cura import Cura 1.0 as Cura
Button Button
@ -56,7 +56,7 @@ Button
visible: showExtruderSwatches && extruderColor != "" visible: showExtruderSwatches && extruderColor != ""
} }
Label UM.Label
{ {
id: buttonText id: buttonText
anchors anchors
@ -67,12 +67,9 @@ Button
verticalCenter: parent.verticalCenter verticalCenter: parent.verticalCenter
} }
text: objectItemButton.text text: objectItemButton.text
font: UM.Theme.getFont("default")
color: UM.Theme.getColor("text_scene") color: UM.Theme.getColor("text_scene")
opacity: (outsideBuildArea) ? 0.5 : 1.0 opacity: (outsideBuildArea) ? 0.5 : 1.0
visible: text != "" visible: text != ""
renderType: Text.NativeRendering
verticalAlignment: Text.AlignVCenter
elide: Text.ElideRight elide: Text.ElideRight
} }

View file

@ -4,7 +4,7 @@
import QtQuick 2.10 import QtQuick 2.10
import QtQuick.Controls 2.3 import QtQuick.Controls 2.3
import UM 1.2 as UM import UM 1.5 as UM
import Cura 1.0 as Cura import Cura 1.0 as Cura
Item Item
@ -51,15 +51,13 @@ Item
source: objectSelector.opened ? UM.Theme.getIcon("ChevronSingleDown") : UM.Theme.getIcon("ChevronSingleUp") source: objectSelector.opened ? UM.Theme.getIcon("ChevronSingleDown") : UM.Theme.getIcon("ChevronSingleUp")
} }
Label UM.Label
{ {
id: label id: label
anchors.left: openCloseIcon.right anchors.left: openCloseIcon.right
anchors.leftMargin: UM.Theme.getSize("default_margin").width anchors.leftMargin: UM.Theme.getSize("default_margin").width
text: catalog.i18nc("@label", "Object list") text: catalog.i18nc("@label", "Object list")
font: UM.Theme.getFont("default")
color: openCloseButton.hovered ? UM.Theme.getColor("small_button_text_hover") : UM.Theme.getColor("small_button_text") color: openCloseButton.hovered ? UM.Theme.getColor("small_button_text_hover") : UM.Theme.getColor("small_button_text")
renderType: Text.NativeRendering
elide: Text.ElideRight elide: Text.ElideRight
} }
} }

View file

@ -7,7 +7,7 @@ import QtQuick.Controls.Styles 1.4
import QtQuick.Layouts 1.3 import QtQuick.Layouts 1.3
import QtQuick.Dialogs 1.2 import QtQuick.Dialogs 1.2
import UM 1.2 as UM import UM 1.5 as UM
import Cura 1.0 as Cura import Cura 1.0 as Cura
// An expandable list of materials. Includes both the header (this file) and the items (brandMaterialList) // An expandable list of materials. Includes both the header (this file) and the items (brandMaterialList)
@ -43,13 +43,12 @@ Item
{ {
id: brand_header id: brand_header
width: parent.width width: parent.width
Label UM.Label
{ {
id: brand_name id: brand_name
text: sectionName text: sectionName
height: UM.Theme.getSize("favorites_row").height height: UM.Theme.getSize("favorites_row").height
width: parent.width - UM.Theme.getSize("favorites_button").width width: parent.width - UM.Theme.getSize("favorites_button").width
verticalAlignment: Text.AlignVCenter
leftPadding: (UM.Theme.getSize("default_margin").width / 2) | 0 leftPadding: (UM.Theme.getSize("default_margin").width / 2) | 0
} }
Item Item

View file

@ -7,7 +7,7 @@ import QtQuick.Controls.Styles 1.4
import QtQuick.Layouts 1.3 import QtQuick.Layouts 1.3
import QtQuick.Dialogs 1.2 import QtQuick.Dialogs 1.2
import UM 1.2 as UM import UM 1.5 as UM
import Cura 1.0 as Cura import Cura 1.0 as Cura
Item Item
@ -57,13 +57,12 @@ Item
{ {
left: parent ? parent.left : undefined left: parent ? parent.left : undefined
} }
Label UM.Label
{ {
text: materialName text: materialName
height: UM.Theme.getSize("favorites_row").height height: UM.Theme.getSize("favorites_row").height
width: parent.width - parent.leftPadding - UM.Theme.getSize("favorites_button").width width: parent.width - parent.leftPadding - UM.Theme.getSize("favorites_button").width
id: material_type_name id: material_type_name
verticalAlignment: Text.AlignVCenter
} }
Item // this one causes lots of warnings Item // this one causes lots of warnings
{ {

View file

@ -6,7 +6,7 @@ import QtQuick.Controls 2.3
import QtQuick.Controls 1.4 as OldControls import QtQuick.Controls 1.4 as OldControls
import QtQuick.Layouts 1.3 import QtQuick.Layouts 1.3
import UM 1.3 as UM import UM 1.5 as UM
import Cura 1.6 as Cura import Cura 1.6 as Cura
import ".." import ".."
@ -34,7 +34,7 @@ Item
rightMargin: parent.padding rightMargin: parent.padding
} }
Label UM.Label
{ {
id: profileLabel id: profileLabel
anchors anchors
@ -46,9 +46,6 @@ Item
} }
text: catalog.i18nc("@label", "Profile") text: catalog.i18nc("@label", "Profile")
font: UM.Theme.getFont("medium") font: UM.Theme.getFont("medium")
renderType: Text.NativeRendering
color: UM.Theme.getColor("text")
verticalAlignment: Text.AlignVCenter
} }
NoIntentIcon NoIntentIcon
@ -80,21 +77,17 @@ Item
anchors.right: customisedSettings.left anchors.right: customisedSettings.left
anchors.leftMargin: UM.Theme.getSize("default_margin").width anchors.leftMargin: UM.Theme.getSize("default_margin").width
Label UM.Label
{ {
id: textLabel id: textLabel
text: Cura.MachineManager.activeQualityDisplayNameMap["main"] text: Cura.MachineManager.activeQualityDisplayNameMap["main"]
font: UM.Theme.getFont("default")
color: UM.Theme.getColor("text")
Layout.margins: 0 Layout.margins: 0
Layout.maximumWidth: Math.floor(parent.width * 0.7) // Always leave >= 30% for the rest of the row. Layout.maximumWidth: Math.floor(parent.width * 0.7) // Always leave >= 30% for the rest of the row.
height: contentHeight height: contentHeight
verticalAlignment: Text.AlignVCenter
renderType: Text.NativeRendering
elide: Text.ElideRight elide: Text.ElideRight
} }
Label UM.Label
{ {
text: activeQualityDetailText() text: activeQualityDetailText()
font: UM.Theme.getFont("default") font: UM.Theme.getFont("default")
@ -103,8 +96,6 @@ Item
Layout.fillWidth: true Layout.fillWidth: true
height: contentHeight height: contentHeight
verticalAlignment: Text.AlignVCenter
renderType: Text.NativeRendering
elide: Text.ElideRight elide: Text.ElideRight
function activeQualityDetailText() function activeQualityDetailText()

View file

@ -4,7 +4,7 @@
import QtQuick 2.10 import QtQuick 2.10
import QtQuick.Controls 2.3 import QtQuick.Controls 2.3
import UM 1.2 as UM import UM 1.5 as UM
import Cura 1.6 as Cura import Cura 1.6 as Cura
Button Button
@ -40,14 +40,11 @@ Button
return txt return txt
} }
contentItem: Label contentItem: UM.Label
{ {
id: textLabel id: textLabel
text: button.text != "" ? replaceText(button.text) : replaceText(button.labelText) text: button.text != "" ? replaceText(button.text) : replaceText(button.labelText)
height: contentHeight height: contentHeight
verticalAlignment: Text.AlignVCenter
renderType: Text.NativeRendering
font: UM.Theme.getFont("default")
color: button.enabled ? UM.Theme.getColor("text") :UM.Theme.getColor("text_inactive") color: button.enabled ? UM.Theme.getColor("text") :UM.Theme.getColor("text_inactive")
} }
} }

View file

@ -4,7 +4,7 @@
import QtQuick 2.10 import QtQuick 2.10
import QtQuick.Controls 2.3 import QtQuick.Controls 2.3
import UM 1.2 as UM import UM 1.5 as UM
import Cura 1.6 as Cura import Cura 1.6 as Cura
Popup Popup
@ -66,12 +66,11 @@ Popup
height: childrenRect.height height: childrenRect.height
width: popup.contentWidth width: popup.contentWidth
Label UM.Label
{ {
id: headerLabel id: headerLabel
text: model.name text: model.name
color: UM.Theme.getColor("text_inactive") color: UM.Theme.getColor("text_inactive")
renderType: Text.NativeRendering
width: parent.width width: parent.width
height: visible ? contentHeight: 0 height: visible ? contentHeight: 0
visible: qualitiesList.visibleChildren.length > 0 visible: qualitiesList.visibleChildren.length > 0
@ -140,11 +139,10 @@ Popup
height: childrenRect.height height: childrenRect.height
width: popup.contentWidth width: popup.contentWidth
Label UM.Label
{ {
id: customProfileHeader id: customProfileHeader
text: catalog.i18nc("@label:header", "Custom profiles") text: catalog.i18nc("@label:header", "Custom profiles")
renderType: Text.NativeRendering
height: visible ? contentHeight: 0 height: visible ? contentHeight: 0
enabled: false enabled: false
visible: profilesList.visibleChildren.length > 1 visible: profilesList.visibleChildren.length > 1
@ -280,29 +278,21 @@ Popup
width: parent.width width: parent.width
height: childrenRect.height height: childrenRect.height
Label UM.Label
{ {
id: textLabel id: textLabel
text: manageProfilesButton.text text: manageProfilesButton.text
height: contentHeight height: contentHeight
anchors.left: parent.left anchors.left: parent.left
anchors.leftMargin: UM.Theme.getSize("default_margin").width + UM.Theme.getSize("narrow_margin").width anchors.leftMargin: UM.Theme.getSize("default_margin").width + UM.Theme.getSize("narrow_margin").width
verticalAlignment: Text.AlignVCenter
renderType: Text.NativeRendering
font: UM.Theme.getFont("default")
color: UM.Theme.getColor("text")
} }
Label UM.Label
{ {
id: shortcutLabel id: shortcutLabel
text: Cura.Actions.manageProfiles.shortcut text: Cura.Actions.manageProfiles.shortcut
height: contentHeight height: contentHeight
anchors.right: parent.right anchors.right: parent.right
anchors.rightMargin: UM.Theme.getSize("default_margin").width anchors.rightMargin: UM.Theme.getSize("default_margin").width
verticalAlignment: Text.AlignVCenter
renderType: Text.NativeRendering
font: UM.Theme.getFont("default")
color: UM.Theme.getColor("text")
} }
} }
onClicked: onClicked:

View file

@ -201,7 +201,7 @@ Item
} }
} }
contentItem: Controls2.Label contentItem:UM.Label
{ {
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.left anchors.left: parent.left
@ -211,12 +211,10 @@ Item
text: supportExtruderCombobox.currentText text: supportExtruderCombobox.currentText
textFormat: Text.PlainText textFormat: Text.PlainText
renderType: Text.NativeRendering
font: UM.Theme.getFont("default")
color: enabled ? UM.Theme.getColor("setting_control_text") : UM.Theme.getColor("setting_control_disabled_text") color: enabled ? UM.Theme.getColor("setting_control_text") : UM.Theme.getColor("setting_control_disabled_text")
elide: Text.ElideLeft elide: Text.ElideLeft
verticalAlignment: Text.AlignVCenter
background: Rectangle background: Rectangle
{ {
@ -262,28 +260,16 @@ Item
height: supportExtruderCombobox.height height: supportExtruderCombobox.height
highlighted: supportExtruderCombobox.highlightedIndex == index highlighted: supportExtruderCombobox.highlightedIndex == index
contentItem: Controls2.Label contentItem: UM.Label
{ {
anchors.fill: parent anchors.fill: parent
anchors.leftMargin: UM.Theme.getSize("setting_unit_margin").width anchors.leftMargin: UM.Theme.getSize("setting_unit_margin").width
anchors.rightMargin: UM.Theme.getSize("setting_unit_margin").width anchors.rightMargin: UM.Theme.getSize("setting_unit_margin").width
text: model.name text: model.name
renderType: Text.NativeRendering color: model.enabled ? UM.Theme.getColor("setting_control_text"): UM.Theme.getColor("action_button_disabled_text")
color:
{
if (model.enabled)
{
UM.Theme.getColor("setting_control_text")
}
else
{
UM.Theme.getColor("action_button_disabled_text");
}
}
font: UM.Theme.getFont("default")
elide: Text.ElideRight elide: Text.ElideRight
verticalAlignment: Text.AlignVCenter
rightPadding: swatch.width + UM.Theme.getSize("setting_unit_margin").width rightPadding: swatch.width + UM.Theme.getSize("setting_unit_margin").width
background: Rectangle background: Rectangle

View file

@ -4,7 +4,7 @@
import QtQuick 2.7 import QtQuick 2.7
import QtQuick.Controls 2.3 import QtQuick.Controls 2.3
import UM 1.0 as UM import UM 1.5 as UM
UM.PointingRectangle UM.PointingRectangle
{ {
@ -88,18 +88,16 @@ UM.PointingRectangle
active: false //Only allow vertical scrolling. We should grow vertically only, but due to how the label is positioned it allocates space in the ScrollView horizontally. active: false //Only allow vertical scrolling. We should grow vertically only, but due to how the label is positioned it allocates space in the ScrollView horizontally.
} }
Label UM.Label
{ {
id: label id: label
x: UM.Theme.getSize("tooltip_margins").width x: UM.Theme.getSize("tooltip_margins").width
y: UM.Theme.getSize("tooltip_margins").height y: UM.Theme.getSize("tooltip_margins").height
width: base.width - UM.Theme.getSize("tooltip_margins").width * 2 width: base.width - UM.Theme.getSize("tooltip_margins").width * 2
wrapMode: Text.Wrap; wrapMode: Text.Wrap
textFormat: Text.RichText textFormat: Text.RichText
font: UM.Theme.getFont("default"); color: UM.Theme.getColor("tooltip_text")
color: UM.Theme.getColor("tooltip_text");
renderType: Text.NativeRendering
} }
} }
} }

View file

@ -6,7 +6,7 @@ import QtQuick.Controls 1.4
import QtQuick.Controls.Styles 1.4 import QtQuick.Controls.Styles 1.4
import QtQuick.Layouts 1.3 import QtQuick.Layouts 1.3
import UM 1.3 as UM import UM 1.5 as UM
import Cura 1.0 as Cura import Cura 1.0 as Cura
import "." import "."
@ -62,15 +62,13 @@ Item
spacing: UM.Theme.getSize("default_margin").width spacing: UM.Theme.getSize("default_margin").width
Label UM.Label
{ {
text: catalog.i18nc("@label", "Jog Position") text: catalog.i18nc("@label", "Jog Position")
color: UM.Theme.getColor("setting_control_text") color: UM.Theme.getColor("setting_control_text")
font: UM.Theme.getFont("default")
width: Math.floor(parent.width * 0.4) - UM.Theme.getSize("default_margin").width width: Math.floor(parent.width * 0.4) - UM.Theme.getSize("default_margin").width
height: UM.Theme.getSize("setting_control").height height: UM.Theme.getSize("setting_control").height
verticalAlignment: Text.AlignVCenter
} }
GridLayout GridLayout
@ -80,14 +78,12 @@ Item
rowSpacing: UM.Theme.getSize("default_lining").width rowSpacing: UM.Theme.getSize("default_lining").width
columnSpacing: UM.Theme.getSize("default_lining").height columnSpacing: UM.Theme.getSize("default_lining").height
Label UM.Label
{ {
text: catalog.i18nc("@label", "X/Y") text: catalog.i18nc("@label", "X/Y")
color: UM.Theme.getColor("setting_control_text") color: UM.Theme.getColor("setting_control_text")
font: UM.Theme.getFont("default")
width: height width: height
height: UM.Theme.getSize("setting_control").height height: UM.Theme.getSize("setting_control").height
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
Layout.row: 0 Layout.row: 0
@ -187,14 +183,12 @@ Item
{ {
spacing: UM.Theme.getSize("default_lining").height spacing: UM.Theme.getSize("default_lining").height
Label UM.Label
{ {
text: catalog.i18nc("@label", "Z") text: catalog.i18nc("@label", "Z")
color: UM.Theme.getColor("setting_control_text") color: UM.Theme.getColor("setting_control_text")
font: UM.Theme.getFont("default")
width: UM.Theme.getSize("section").height width: UM.Theme.getSize("section").height
height: UM.Theme.getSize("setting_control").height height: UM.Theme.getSize("setting_control").height
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
} }
@ -252,15 +246,13 @@ Item
property real currentDistance: 10 property real currentDistance: 10
Label UM.Label
{ {
text: catalog.i18nc("@label", "Jog Distance") text: catalog.i18nc("@label", "Jog Distance")
color: UM.Theme.getColor("setting_control_text") color: UM.Theme.getColor("setting_control_text")
font: UM.Theme.getFont("default")
width: Math.floor(parent.width * 0.4) - UM.Theme.getSize("default_margin").width width: Math.floor(parent.width * 0.4) - UM.Theme.getSize("default_margin").width
height: UM.Theme.getSize("setting_control").height height: UM.Theme.getSize("setting_control").height
verticalAlignment: Text.AlignVCenter
} }
Row Row
@ -296,15 +288,13 @@ Item
spacing: UM.Theme.getSize("default_margin").width spacing: UM.Theme.getSize("default_margin").width
Label UM.Label
{ {
text: catalog.i18nc("@label", "Send G-code") text: catalog.i18nc("@label", "Send G-code")
color: UM.Theme.getColor("setting_control_text") color: UM.Theme.getColor("setting_control_text")
font: UM.Theme.getFont("default")
width: Math.floor(parent.width * 0.4) - UM.Theme.getSize("default_margin").width width: Math.floor(parent.width * 0.4) - UM.Theme.getSize("default_margin").width
height: UM.Theme.getSize("setting_control").height height: UM.Theme.getSize("setting_control").height
verticalAlignment: Text.AlignVCenter
} }
Row Row

View file

@ -4,7 +4,7 @@
import QtQuick 2.10 import QtQuick 2.10
import QtQuick.Controls 2.3 import QtQuick.Controls 2.3
import UM 1.1 as UM import UM 1.5 as UM
import Cura 1.0 as Cura import Cura 1.0 as Cura
@ -43,7 +43,7 @@ Button
width: machineSelectorButton.width - machineSelectorButton.leftPadding width: machineSelectorButton.width - machineSelectorButton.leftPadding
height: UM.Theme.getSize("action_button").height height: UM.Theme.getSize("action_button").height
Label UM.Label
{ {
id: buttonText id: buttonText
anchors anchors
@ -56,8 +56,6 @@ Button
color: enabled ? UM.Theme.getColor("text") : UM.Theme.getColor("small_button_text") color: enabled ? UM.Theme.getColor("text") : UM.Theme.getColor("small_button_text")
font: UM.Theme.getFont("medium") font: UM.Theme.getFont("medium")
visible: text != "" visible: text != ""
renderType: Text.NativeRendering
verticalAlignment: Text.AlignVCenter
elide: Text.ElideRight elide: Text.ElideRight
} }

View file

@ -4,7 +4,7 @@
import QtQuick 2.7 import QtQuick 2.7
import QtQuick.Controls 2.3 import QtQuick.Controls 2.3
import UM 1.2 as UM import UM 1.5 as UM
import Cura 1.0 as Cura import Cura 1.0 as Cura
ListView ListView
@ -14,16 +14,14 @@ ListView
section.property: "hasRemoteConnection" section.property: "hasRemoteConnection"
property real contentHeight: childrenRect.height property real contentHeight: childrenRect.height
section.delegate: Label section.delegate: UM.Label
{ {
text: section == "true" ? catalog.i18nc("@label", "Connected printers") : catalog.i18nc("@label", "Preset printers") text: section == "true" ? catalog.i18nc("@label", "Connected printers") : catalog.i18nc("@label", "Preset printers")
width: parent.width width: parent.width
height: UM.Theme.getSize("action_button").height height: UM.Theme.getSize("action_button").height
leftPadding: UM.Theme.getSize("default_margin").width leftPadding: UM.Theme.getSize("default_margin").width
renderType: Text.NativeRendering
font: UM.Theme.getFont("medium") font: UM.Theme.getFont("medium")
color: UM.Theme.getColor("text_medium") color: UM.Theme.getColor("text_medium")
verticalAlignment: Text.AlignVCenter
} }
delegate: MachineSelectorButton delegate: MachineSelectorButton

View file

@ -4,7 +4,7 @@
import QtQuick 2.7 import QtQuick 2.7
import QtQuick.Controls 2.0 import QtQuick.Controls 2.0
import UM 1.1 as UM import UM 1.5 as UM
import Cura 1.0 as Cura import Cura 1.0 as Cura
SettingItem SettingItem
@ -143,7 +143,7 @@ SettingItem
} }
} }
contentItem: Label contentItem: UM.Label
{ {
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.left anchors.left: parent.left
@ -153,13 +153,8 @@ SettingItem
text: control.currentText text: control.currentText
textFormat: Text.PlainText textFormat: Text.PlainText
renderType: Text.NativeRendering
font: UM.Theme.getFont("default")
color: enabled ? UM.Theme.getColor("setting_control_text") : UM.Theme.getColor("setting_control_disabled_text") color: enabled ? UM.Theme.getColor("setting_control_text") : UM.Theme.getColor("setting_control_disabled_text")
elide: Text.ElideLeft
verticalAlignment: Text.AlignVCenter
background: Rectangle background: Rectangle
{ {
id: swatch id: swatch
@ -204,27 +199,15 @@ SettingItem
height: control.height height: control.height
highlighted: control.highlightedIndex == index highlighted: control.highlightedIndex == index
contentItem: Label contentItem: UM.Label
{ {
anchors.fill: parent anchors.fill: parent
anchors.leftMargin: UM.Theme.getSize("setting_unit_margin").width anchors.leftMargin: UM.Theme.getSize("setting_unit_margin").width
anchors.rightMargin: UM.Theme.getSize("setting_unit_margin").width anchors.rightMargin: UM.Theme.getSize("setting_unit_margin").width
text: model.name text: model.name
renderType: Text.NativeRendering color: model.enabled ? UM.Theme.getColor("setting_control_text") : UM.Theme.getColor("action_button_disabled_text")
color:
{
if (model.enabled)
{
UM.Theme.getColor("setting_control_text")
} else
{
UM.Theme.getColor("action_button_disabled_text");
}
}
font: UM.Theme.getFont("default")
elide: Text.ElideRight elide: Text.ElideRight
verticalAlignment: Text.AlignVCenter
rightPadding: swatch.width + UM.Theme.getSize("setting_unit_margin").width rightPadding: swatch.width + UM.Theme.getSize("setting_unit_margin").width
background: Rectangle background: Rectangle

View file

@ -4,7 +4,7 @@
import QtQuick 2.7 import QtQuick 2.7
import QtQuick.Controls 2.0 import QtQuick.Controls 2.0
import UM 1.1 as UM import UM 1.5 as UM
import Cura 1.0 as Cura import Cura 1.0 as Cura
SettingItem SettingItem
@ -144,7 +144,7 @@ SettingItem
} }
} }
contentItem: Label contentItem: UM.Label
{ {
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.left anchors.left: parent.left
@ -154,12 +154,9 @@ SettingItem
text: control.currentText text: control.currentText
textFormat: Text.PlainText textFormat: Text.PlainText
renderType: Text.NativeRendering
font: UM.Theme.getFont("default")
color: enabled ? UM.Theme.getColor("setting_control_text") : UM.Theme.getColor("setting_control_disabled_text") color: enabled ? UM.Theme.getColor("setting_control_text") : UM.Theme.getColor("setting_control_disabled_text")
elide: Text.ElideRight elide: Text.ElideRight
verticalAlignment: Text.AlignVCenter
background: Rectangle background: Rectangle
{ {
@ -175,13 +172,15 @@ SettingItem
} }
} }
popup: Popup { popup: Popup
{
y: control.height - UM.Theme.getSize("default_lining").height y: control.height - UM.Theme.getSize("default_lining").height
width: control.width width: control.width
implicitHeight: contentItem.implicitHeight + 2 * UM.Theme.getSize("default_lining").width implicitHeight: contentItem.implicitHeight + 2 * UM.Theme.getSize("default_lining").width
padding: UM.Theme.getSize("default_lining").width padding: UM.Theme.getSize("default_lining").width
contentItem: ListView { contentItem: ListView
{
clip: true clip: true
implicitHeight: contentHeight implicitHeight: contentHeight
model: control.popup.visible ? control.delegateModel : null model: control.popup.visible ? control.delegateModel : null
@ -202,7 +201,7 @@ SettingItem
height: control.height height: control.height
highlighted: control.highlightedIndex == index highlighted: control.highlightedIndex == index
contentItem: Label contentItem: UM.Label
{ {
anchors.fill: parent anchors.fill: parent
anchors.leftMargin: UM.Theme.getSize("setting_unit_margin").width anchors.leftMargin: UM.Theme.getSize("setting_unit_margin").width
@ -210,7 +209,6 @@ SettingItem
text: model.name text: model.name
textFormat: Text.PlainText textFormat: Text.PlainText
renderType: Text.NativeRendering
color: color:
{ {
if (model.enabled) { if (model.enabled) {
@ -219,9 +217,7 @@ SettingItem
UM.Theme.getColor("action_button_disabled_text"); UM.Theme.getColor("action_button_disabled_text");
} }
} }
font: UM.Theme.getFont("default")
elide: Text.ElideRight elide: Text.ElideRight
verticalAlignment: Text.AlignVCenter
rightPadding: swatch.width + UM.Theme.getSize("setting_unit_margin").width rightPadding: swatch.width + UM.Theme.getSize("setting_unit_margin").width
background: Rectangle background: Rectangle

View file

@ -4,17 +4,13 @@
import QtQuick 2.7 import QtQuick 2.7
import QtQuick.Controls 2.0 import QtQuick.Controls 2.0
import UM 1.2 as UM import UM 1.5 as UM
SettingItem SettingItem
{ {
contents: Label contents: UM.Label
{ {
anchors.fill: parent anchors.fill: parent
text: propertyProvider.properties.value + " " + unit text: propertyProvider.properties.value + " " + unit
renderType: Text.NativeRendering
font: UM.Theme.getFont("default")
color: UM.Theme.getColor("text")
verticalAlignment: Text.AlignVCenter
} }
} }

View file

@ -6,7 +6,7 @@ import QtQuick.Controls 1.4 as OldControls // TableView doesn't exist in the QtQ
import QtQuick.Controls 2.3 import QtQuick.Controls 2.3
import QtQuick.Controls.Styles 1.4 import QtQuick.Controls.Styles 1.4
import UM 1.2 as UM import UM 1.5 as UM
OldControls.TableView OldControls.TableView
@ -15,7 +15,7 @@ OldControls.TableView
{ {
height: tableCellLabel.implicitHeight height: tableCellLabel.implicitHeight
Label UM.Label
{ {
id: tableCellLabel id: tableCellLabel
color: styleData.selected ? UM.Theme.getColor("primary_button_text") : UM.Theme.getColor("text") color: styleData.selected ? UM.Theme.getColor("primary_button_text") : UM.Theme.getColor("text")
@ -23,7 +23,6 @@ OldControls.TableView
text: styleData.value text: styleData.value
anchors.fill: parent anchors.fill: parent
anchors.leftMargin: 10 * screenScaleFactor anchors.leftMargin: 10 * screenScaleFactor
verticalAlignment: Text.AlignVCenter
} }
} }

View file

@ -4,7 +4,7 @@
import QtQuick 2.7 import QtQuick 2.7
import QtQuick.Controls 2.3 import QtQuick.Controls 2.3
import UM 1.0 as UM import UM 1.5 as UM
import Cura 1.0 as Cura import Cura 1.0 as Cura
ToolTip ToolTip
@ -62,7 +62,7 @@ ToolTip
visible: tooltip.height != 0 visible: tooltip.height != 0
} }
contentItem: Label contentItem: UM.Label
{ {
id: label id: label
text: tooltip.text text: tooltip.text
@ -70,7 +70,6 @@ ToolTip
wrapMode: Text.Wrap wrapMode: Text.Wrap
textFormat: Text.RichText textFormat: Text.RichText
color: UM.Theme.getColor("tooltip_text") color: UM.Theme.getColor("tooltip_text")
renderType: Text.NativeRendering
} }
function show() { function show() {

View file

@ -4,7 +4,7 @@
import QtQuick 2.7 import QtQuick 2.7
import QtQuick.Controls 2.3 import QtQuick.Controls 2.3
import UM 1.2 as UM import UM 1.5 as UM
import Cura 1.0 as Cura import Cura 1.0 as Cura
Cura.ExpandablePopup Cura.ExpandablePopup
@ -44,22 +44,19 @@ Cura.ExpandablePopup
headerItem: Item headerItem: Item
{ {
Label UM.Label
{ {
id: title id: title
text: catalog.i18nc("@label", "View type") text: catalog.i18nc("@label", "View type")
verticalAlignment: Text.AlignVCenter
height: parent.height height: parent.height
elide: Text.ElideRight elide: Text.ElideRight
font: UM.Theme.getFont("medium") font: UM.Theme.getFont("medium")
color: UM.Theme.getColor("text_medium") color: UM.Theme.getColor("text_medium")
renderType: Text.NativeRendering
} }
Label UM.Label
{ {
text: viewSelector.activeView ? viewSelector.activeView.name : "" text: viewSelector.activeView ? viewSelector.activeView.name : ""
verticalAlignment: Text.AlignVCenter
anchors anchors
{ {
left: title.right left: title.right
@ -69,8 +66,6 @@ Cura.ExpandablePopup
height: parent.height height: parent.height
elide: Text.ElideRight elide: Text.ElideRight
font: UM.Theme.getFont("medium") font: UM.Theme.getFont("medium")
color: UM.Theme.getColor("text")
renderType: Text.NativeRendering
} }
} }
@ -102,14 +97,11 @@ Cura.ExpandablePopup
checkable: true checkable: true
checked: viewSelector.activeView != null ? viewSelector.activeView.id == id : false checked: viewSelector.activeView != null ? viewSelector.activeView.id == id : false
contentItem: Label contentItem: UM.Label
{ {
id: buttonText id: buttonText
text: viewsSelectorButton.text text: viewsSelectorButton.text
color: UM.Theme.getColor("text")
font: UM.Theme.getFont("medium") font: UM.Theme.getFont("medium")
renderType: Text.NativeRendering
verticalAlignment: Text.AlignVCenter
elide: Text.ElideRight elide: Text.ElideRight
} }

View file

@ -4,7 +4,7 @@
import QtQuick 2.10 import QtQuick 2.10
import QtQuick.Controls 2.3 import QtQuick.Controls 2.3
import UM 1.3 as UM import UM 1.5 as UM
import Cura 1.1 as Cura import Cura 1.1 as Cura
@ -146,16 +146,13 @@ Item
source: base.currentSection == section ? UM.Theme.getIcon("ChevronSingleDown") : UM.Theme.getIcon("ChevronSingleRight") source: base.currentSection == section ? UM.Theme.getIcon("ChevronSingleDown") : UM.Theme.getIcon("ChevronSingleRight")
} }
Label UM.Label
{ {
id: label id: label
anchors.left: arrow.right anchors.left: arrow.right
anchors.leftMargin: UM.Theme.getSize("default_margin").width anchors.leftMargin: UM.Theme.getSize("default_margin").width
verticalAlignment: Text.AlignVCenter
text: button.text text: button.text
font: UM.Theme.getFont("default_bold") font: UM.Theme.getFont("default_bold")
color: UM.Theme.getColor("text")
renderType: Text.NativeRendering
} }
} }
@ -210,7 +207,7 @@ Item
spacing: UM.Theme.getSize("default_margin").width spacing: UM.Theme.getSize("default_margin").width
padding: UM.Theme.getSize("default_margin").width padding: UM.Theme.getSize("default_margin").width
Label UM.Label
{ {
width: parent.width - (2 * UM.Theme.getSize("default_margin").width) width: parent.width - (2 * UM.Theme.getSize("default_margin").width)
wrapMode: Text.Wrap wrapMode: Text.Wrap
@ -228,48 +225,33 @@ Item
verticalItemAlignment: Grid.AlignVCenter verticalItemAlignment: Grid.AlignVCenter
Label UM.Label
{ {
id: manufacturerLabel id: manufacturerLabel
text: catalog.i18nc("@label", "Manufacturer") text: catalog.i18nc("@label", "Manufacturer")
font: UM.Theme.getFont("default")
color: UM.Theme.getColor("text")
renderType: Text.NativeRendering
} }
Label UM.Label
{ {
text: base.getMachineMetaDataEntry("manufacturer") text: base.getMachineMetaDataEntry("manufacturer")
width: parent.width - manufacturerLabel.width width: parent.width - manufacturerLabel.width
font: UM.Theme.getFont("default")
color: UM.Theme.getColor("text")
renderType: Text.NativeRendering
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
} }
Label UM.Label
{ {
id: profileAuthorLabel id: profileAuthorLabel
text: catalog.i18nc("@label", "Profile author") text: catalog.i18nc("@label", "Profile author")
font: UM.Theme.getFont("default")
color: UM.Theme.getColor("text")
renderType: Text.NativeRendering
} }
Label UM.Label
{ {
text: base.getMachineMetaDataEntry("author") text: base.getMachineMetaDataEntry("author")
width: parent.width - profileAuthorLabel.width width: parent.width - profileAuthorLabel.width
font: UM.Theme.getFont("default")
color: UM.Theme.getColor("text")
renderType: Text.NativeRendering
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
} }
Label UM.Label
{ {
id: printerNameLabel id: printerNameLabel
text: catalog.i18nc("@label", "Printer name") text: catalog.i18nc("@label", "Printer name")
font: UM.Theme.getFont("default")
color: UM.Theme.getColor("text")
renderType: Text.NativeRendering
} }
Cura.TextField Cura.TextField
@ -286,7 +268,5 @@ Item
} }
} }
} }
} }
} }

View file

@ -4,7 +4,7 @@
import QtQuick 2.10 import QtQuick 2.10
import QtQuick.Controls 2.3 import QtQuick.Controls 2.3
import UM 1.3 as UM import UM 1.5 as UM
import Cura 1.1 as Cura import Cura 1.1 as Cura
// //
@ -34,16 +34,13 @@ Item
anchors.right: parent.right anchors.right: parent.right
anchors.top: parent.top anchors.top: parent.top
Label UM.Label
{ {
id: noPrinterLabel id: noPrinterLabel
height: UM.Theme.getSize("setting_control").height + UM.Theme.getSize("default_margin").height height: UM.Theme.getSize("setting_control").height + UM.Theme.getSize("default_margin").height
anchors.left: parent.left anchors.left: parent.left
anchors.leftMargin: UM.Theme.getSize("default_margin").width anchors.leftMargin: UM.Theme.getSize("default_margin").width
text: catalog.i18nc("@label", "There is no printer found over your network.") text: catalog.i18nc("@label", "There is no printer found over your network.")
color: UM.Theme.getColor("text")
renderType: Text.NativeRendering
verticalAlignment: Text.AlignVCenter
visible: networkPrinterListView.count == 0 // Do not show if there are discovered devices. visible: networkPrinterListView.count == 0 // Do not show if there are discovered devices.
} }
@ -107,16 +104,13 @@ Item
{ {
id: sectionHeading id: sectionHeading
Label UM.Label
{ {
anchors.left: parent.left anchors.left: parent.left
anchors.leftMargin: UM.Theme.getSize("default_margin").width anchors.leftMargin: UM.Theme.getSize("default_margin").width
height: UM.Theme.getSize("setting_control").height height: UM.Theme.getSize("setting_control").height
text: section text: section
font: UM.Theme.getFont("default")
color: UM.Theme.getColor("small_button_text") color: UM.Theme.getColor("small_button_text")
verticalAlignment: Text.AlignVCenter
renderType: Text.NativeRendering
} }
} }
@ -233,7 +227,7 @@ Item
source: UM.Theme.getIcon("LinkExternal") source: UM.Theme.getIcon("LinkExternal")
} }
Label UM.Label
{ {
id: troubleshootingLabel id: troubleshootingLabel
anchors.right: parent.right anchors.right: parent.right
@ -241,8 +235,6 @@ Item
text: catalog.i18nc("@label", "Troubleshooting") text: catalog.i18nc("@label", "Troubleshooting")
font: UM.Theme.getFont("default") font: UM.Theme.getFont("default")
color: UM.Theme.getColor("text_link") color: UM.Theme.getColor("text_link")
linkColor: UM.Theme.getColor("text_link")
renderType: Text.NativeRendering
} }
MouseArea MouseArea

View file

@ -4,7 +4,7 @@
import QtQuick 2.10 import QtQuick 2.10
import QtQuick.Controls 2.3 import QtQuick.Controls 2.3
import UM 1.3 as UM import UM 1.5 as UM
import Cura 1.1 as Cura import Cura 1.1 as Cura
@ -15,7 +15,7 @@ Item
{ {
UM.I18nCatalog { id: catalog; name: "cura" } UM.I18nCatalog { id: catalog; name: "cura" }
Label UM.Label
{ {
id: titleLabel id: titleLabel
anchors.top: parent.top anchors.top: parent.top
@ -24,7 +24,6 @@ Item
text: catalog.i18nc("@label", "Release Notes") text: catalog.i18nc("@label", "Release Notes")
color: UM.Theme.getColor("primary_button") color: UM.Theme.getColor("primary_button")
font: UM.Theme.getFont("huge") font: UM.Theme.getFont("huge")
renderType: Text.NativeRendering
} }
Cura.ScrollableTextArea Cura.ScrollableTextArea

View file

@ -4,7 +4,7 @@
import QtQuick 2.10 import QtQuick 2.10
import QtQuick.Controls 2.3 import QtQuick.Controls 2.3
import UM 1.3 as UM import UM 1.5 as UM
import Cura 1.1 as Cura import Cura 1.1 as Cura
import ".." import ".."
@ -46,16 +46,14 @@ Cura.RoundedRectangle
onClicked: base.clicked() onClicked: base.clicked()
} }
Label UM.Label
{ {
id: title id: title
anchors.left: parent.left anchors.left: parent.left
anchors.leftMargin: UM.Theme.getSize("default_margin").width anchors.leftMargin: UM.Theme.getSize("default_margin").width
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
verticalAlignment: Text.AlignVCenter
text: base.title text: base.title
font: UM.Theme.getFont("medium") font: UM.Theme.getFont("medium")
renderType: Text.NativeRendering
color: base.hovered ? UM.Theme.getColor("small_button_text_hover") : UM.Theme.getColor("small_button_text") color: base.hovered ? UM.Theme.getColor("small_button_text_hover") : UM.Theme.getColor("small_button_text")
} }

View file

@ -4,7 +4,7 @@
import QtQuick 2.10 import QtQuick 2.10
import QtQuick.Controls 2.3 import QtQuick.Controls 2.3
import UM 1.3 as UM import UM 1.5 as UM
import Cura 1.1 as Cura import Cura 1.1 as Cura
@ -88,14 +88,12 @@ Item
{ {
id: emptyComponent id: emptyComponent
Label UM.Label
{ {
text: catalog.i18nc("@label", "Empty") text: catalog.i18nc("@label", "Empty")
height: UM.Theme.getSize("action_button").height height: UM.Theme.getSize("action_button").height
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
font: UM.Theme.getFont("medium") font: UM.Theme.getFont("medium")
renderType: Text.NativeRendering
} }
} }
} }

View file

@ -4,7 +4,7 @@
import QtQuick 2.10 import QtQuick 2.10
import QtQuick.Controls 2.3 import QtQuick.Controls 2.3
import UM 1.3 as UM import UM 1.5 as UM
import Cura 1.1 as Cura import Cura 1.1 as Cura
// //
@ -14,7 +14,7 @@ Item
{ {
UM.I18nCatalog { id: catalog; name: "cura" } UM.I18nCatalog { id: catalog; name: "cura" }
Label UM.Label
{ {
id: titleLabel id: titleLabel
anchors.top: parent.top anchors.top: parent.top
@ -23,10 +23,9 @@ Item
text: catalog.i18nc("@label", "User Agreement") text: catalog.i18nc("@label", "User Agreement")
color: UM.Theme.getColor("primary_button") color: UM.Theme.getColor("primary_button")
font: UM.Theme.getFont("huge") font: UM.Theme.getFont("huge")
renderType: Text.NativeRendering
} }
Label UM.Label
{ {
id: disclaimerLineLabel id: disclaimerLineLabel
anchors anchors
@ -44,8 +43,6 @@ Item
textFormat: Text.RichText textFormat: Text.RichText
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
font: UM.Theme.getFont("medium") font: UM.Theme.getFont("medium")
color: UM.Theme.getColor("text")
renderType: Text.NativeRendering
} }
Cura.PrimaryButton Cura.PrimaryButton

View file

@ -1,10 +1,10 @@
// Copyright (c) 2020 Ultimaker B.V. // Copyright (c) 2021 Ultimaker B.V.
// Cura is released under the terms of the LGPLv3 or higher. // Cura is released under the terms of the LGPLv3 or higher.
import QtQuick 2.10 import QtQuick 2.10
import QtQuick.Controls 2.3 import QtQuick.Controls 2.3
import UM 1.3 as UM import UM 1.5 as UM
import Cura 1.1 as Cura import Cura 1.1 as Cura
@ -64,14 +64,11 @@ CheckBox
} }
} }
contentItem: Label contentItem: UM.Label
{ {
id: textLabel id: textLabel
leftPadding: control.indicator.width + control.spacing leftPadding: control.indicator.width + control.spacing
text: control.text text: control.text
font: control.font font: control.font
color: UM.Theme.getColor("text")
renderType: Text.NativeRendering
verticalAlignment: Text.AlignVCenter
} }
} }

View file

@ -4,7 +4,7 @@
import QtQuick 2.10 import QtQuick 2.10
import QtQuick.Controls 2.3 import QtQuick.Controls 2.3
import UM 1.3 as UM import UM 1.5 as UM
import Cura 1.1 as Cura import Cura 1.1 as Cura
@ -65,7 +65,7 @@ ComboBox
color: UM.Theme.getColor("setting_control_button") color: UM.Theme.getColor("setting_control_button")
} }
contentItem: Label contentItem: UM.Label
{ {
id: contentLabel id: contentLabel
anchors.left: parent.left anchors.left: parent.left
@ -86,11 +86,8 @@ ComboBox
} }
textFormat: Text.PlainText textFormat: Text.PlainText
renderType: Text.NativeRendering
font: UM.Theme.getFont("default")
color: control.currentIndex == -1 ? UM.Theme.getColor("setting_control_disabled_text") : UM.Theme.getColor("setting_control_text") color: control.currentIndex == -1 ? UM.Theme.getColor("setting_control_disabled_text") : UM.Theme.getColor("setting_control_text")
elide: Text.ElideRight elide: Text.ElideRight
verticalAlignment: Text.AlignVCenter
} }
popup: Popup popup: Popup
@ -140,7 +137,7 @@ ComboBox
return (typeof _val !== 'undefined') ? _val : "" return (typeof _val !== 'undefined') ? _val : ""
} }
contentItem: Label contentItem: UM.Label
{ {
id: delegateLabel id: delegateLabel
// FIXME: Somehow the top/bottom anchoring is not correct on Linux and it results in invisible texts. // FIXME: Somehow the top/bottom anchoring is not correct on Linux and it results in invisible texts.
@ -150,11 +147,8 @@ ComboBox
text: delegateItem.text text: delegateItem.text
textFormat: Text.PlainText textFormat: Text.PlainText
renderType: Text.NativeRendering
color: UM.Theme.getColor("setting_control_text") color: UM.Theme.getColor("setting_control_text")
font: UM.Theme.getFont("default")
elide: Text.ElideRight elide: Text.ElideRight
verticalAlignment: Text.AlignVCenter
} }
background: UM.TooltipArea background: UM.TooltipArea

View file

@ -4,7 +4,7 @@
import QtQuick 2.10 import QtQuick 2.10
import QtQuick.Controls 2.3 import QtQuick.Controls 2.3
import UM 1.4 as UM import UM 1.5 as UM
// //
@ -22,15 +22,12 @@ Rectangle
property alias labelText: notificationLabel.text property alias labelText: notificationLabel.text
property alias labelFont: notificationLabel.font property alias labelFont: notificationLabel.font
Label UM.Label
{ {
id: notificationLabel id: notificationLabel
anchors.fill: parent anchors.fill: parent
color: UM.Theme.getColor("primary_text") color: UM.Theme.getColor("primary_text")
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
font: UM.Theme.getFont("default")
renderType: Text.NativeRendering
// This is a bit of a hack, but we don't really have enough room for 2 characters (eg 9+). The default font // This is a bit of a hack, but we don't really have enough room for 2 characters (eg 9+). The default font
// does have a tad bit to much spacing. So instead of adding a whole new font, we just modify it a bit for this // does have a tad bit to much spacing. So instead of adding a whole new font, we just modify it a bit for this

View file

@ -4,7 +4,7 @@
import QtQuick 2.10 import QtQuick 2.10
import QtQuick.Controls 2.3 import QtQuick.Controls 2.3
import UM 1.3 as UM import UM 1.5 as UM
import Cura 1.0 as Cura import Cura 1.0 as Cura
@ -43,13 +43,10 @@ RadioButton
} }
} }
contentItem: Label contentItem: UM.Label
{ {
verticalAlignment: Text.AlignVCenter
leftPadding: radioButton.indicator.width + radioButton.spacing leftPadding: radioButton.indicator.width + radioButton.spacing
text: radioButton.text text: radioButton.text
font: radioButton.font font: radioButton.font
color: UM.Theme.getColor("text")
renderType: Text.NativeRendering
} }
} }