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

View file

@ -5,7 +5,7 @@ import QtQuick 2.7
import QtQuick.Controls 2.1
import QtQuick.Layouts 1.3
import UM 1.3 as UM
import UM 1.5 as UM
RowLayout
{
@ -26,27 +26,21 @@ RowLayout
color: UM.Theme.getColor("text")
}
Label
UM.Label
{
id: detailName
color: UM.Theme.getColor("text")
elide: Text.ElideRight
Layout.minimumWidth: 50 * screenScaleFactor
Layout.maximumWidth: 100 * screenScaleFactor
Layout.fillWidth: true
font: UM.Theme.getFont("default")
renderType: Text.NativeRendering
}
Label
UM.Label
{
id: detailValue
color: UM.Theme.getColor("text")
elide: Text.ElideRight
Layout.minimumWidth: 50 * screenScaleFactor
Layout.maximumWidth: 100 * screenScaleFactor
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.Window 2.2
import UM 1.3 as UM
import UM 1.5 as UM
import Cura 1.1 as Cura
import "../components"
@ -28,18 +28,14 @@ Column
width: Math.round(parent.width / 4)
}
Label
UM.Label
{
id: welcomeTextLabel
text: catalog.i18nc("@description", "Backup and synchronize your Cura settings.")
width: Math.round(parent.width / 2)
font: UM.Theme.getFont("default")
color: UM.Theme.getColor("text")
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignHCenter
anchors.horizontalCenter: parent.horizontalCenter
wrapMode: Label.WordWrap
renderType: Text.NativeRendering
}
Cura.PrimaryButton

View file

@ -5,7 +5,7 @@ import QtQuick 2.2
import QtQuick.Controls 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 ".."
@ -126,13 +126,10 @@ Item
}
Label
UM.Label
{
id: meshTypeLabel
font: UM.Theme.getFont("default")
color: UM.Theme.getColor("text")
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.Controls 2.3
import UM 1.3 as UM
import UM 1.5 as UM
import Cura 1.1 as Cura
@ -131,14 +131,10 @@ Item
height: UM.Theme.getSize("action_button").height
hoverEnabled: true
contentItem: Label
contentItem: UM.Label
{
text: model.displayText
color: UM.Theme.getColor("text")
font: UM.Theme.getFont("medium")
renderType: Text.NativeRendering
verticalAlignment: Text.AlignVCenter
width: contentWidth
height: parent.height
}

View file

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

View file

@ -4,7 +4,7 @@
import QtQuick 2.2
import QtQuick.Controls 1.4
import QtQuick.Controls.Styles 1.4
import UM 1.1 as UM
import UM 1.5 as UM
ButtonStyle
{
@ -19,11 +19,9 @@ ButtonStyle
color: UM.Theme.getColor("lining")
}
}
label: Label
label: UM.Label
{
text: control.text
color: UM.Theme.getColor("text")
verticalAlignment: Text.AlignVCenter
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.
height: visible ? heading.height + table.height: 0
Label
UM.Label
{
id: heading
width: parent.width
@ -35,7 +35,6 @@ Item
wrapMode: Text.WordWrap
color: UM.Theme.getColor("text_medium")
font: UM.Theme.getFont("medium")
renderType: Text.NativeRendering
}
TableView
@ -92,29 +91,25 @@ Item
itemDelegate: Item
{
height: UM.Theme.getSize("toolbox_chart_row").height
Label
UM.Label
{
anchors.verticalCenter: parent.verticalCenter
elide: Text.ElideRight
text: styleData.value || ""
color: UM.Theme.getColor("text_medium")
font: UM.Theme.getFont("default")
renderType: Text.NativeRendering
}
}
Component
{
id: columnTextDelegate
Label
UM.Label
{
anchors.fill: parent
verticalAlignment: Text.AlignVCenter
text: styleData.value || ""
elide: Text.ElideRight
color: UM.Theme.getColor("text_medium")
font: UM.Theme.getFont("default")
renderType: Text.NativeRendering
}
}
@ -152,7 +147,7 @@ Item
}
}
Label
UM.Label
{
id: dataSheetLinks
anchors.top: compatibilityItem.bottom
@ -200,10 +195,6 @@ Item
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"])
renderType: Text.NativeRendering
}
}

View file

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

View file

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

View file

@ -4,7 +4,7 @@
import QtQuick 2.10
import QtQuick.Controls 2.3
import UM 1.1 as UM
import UM 1.5 as UM
import Cura 1.0 as Cura
Item
@ -14,12 +14,10 @@ Item
anchors.bottom: parent.bottom
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.")
color: UM.Theme.getColor("text")
height: UM.Theme.getSize("toolbox_footer_button").height
verticalAlignment: Text.AlignVCenter
wrapMode: Text.WordWrap
anchors
{
@ -29,7 +27,6 @@ Item
right: restartButton.left
rightMargin: UM.Theme.getSize("default_margin").width
}
renderType: Text.NativeRendering
}
Cura.PrimaryButton

View file

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

View file

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

View file

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

View file

@ -3,7 +3,7 @@
import QtQuick 2.2
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
@ -57,19 +57,15 @@ Item
}
}
Label
UM.Label
{
id: buildplateLabel
color: UM.Theme.getColor("text")
elide: Text.ElideRight
font: UM.Theme.getFont("default") // 12pt, regular
text: buildplate ? buildplate : ""
visible: text !== ""
// FIXED-LINE-HEIGHT:
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.Layouts 1.3
import QtQuick.Dialogs 1.2
import UM 1.3 as UM
import UM 1.5 as UM
UM.Dialog
{
@ -63,7 +63,7 @@ UM.Dialog
}
]
Label
UM.Label
{
anchors
{
@ -72,7 +72,6 @@ UM.Dialog
bottomMargin: 56 * screenScaleFactor // TODO: Theme!
}
wrapMode: Text.WordWrap
renderType: Text.NativeRendering
text:
{
if (!printer || !printer.activePrintJob)

View file

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

View file

@ -3,7 +3,7 @@
import QtQuick 2.2
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
@ -35,18 +35,16 @@ Item
width: size
}
Label
UM.Label
{
id: positionLabel
anchors.centerIn: icon
font: UM.Theme.getFont("small")
color: UM.Theme.getColor("text")
height: Math.round(size / 2)
horizontalAlignment: Text.AlignHCenter
text: position + 1
verticalAlignment: Text.AlignVCenter
width: Math.round(size / 2)
visible: position >= 0
renderType: Text.NativeRendering
}
}

View file

@ -2,7 +2,7 @@
// Cura is released under the terms of the LGPLv3 or higher.
import QtQuick 2.2
import QtQuick.Controls 2.0
import UM 1.3 as UM
import UM 1.5 as UM
import Cura 1.0 as Cura
/**
@ -55,10 +55,9 @@ Item
visible: !printJob
radius: 2 * screenScaleFactor // TODO: Theme!
}
Label
UM.Label
{
text: printJob && printJob.name ? printJob.name : ""
color: UM.Theme.getColor("text")
elide: Text.ElideRight
font: UM.Theme.getFont("medium") // 14pt, regular
visible: printJob
@ -66,8 +65,6 @@ Item
// FIXED-LINE-HEIGHT:
width: parent.width
height: parent.height
verticalAlignment: Text.AlignVCenter
renderType: Text.NativeRendering
}
}
@ -86,18 +83,15 @@ Item
radius: 2 * screenScaleFactor // TODO: Theme!
}
Label
UM.Label
{
text: printJob ? OutputDevice.formatDuration(printJob.timeTotal) : ""
color: UM.Theme.getColor("text")
elide: Text.ElideRight
font: UM.Theme.getFont("medium") // 14pt, regular
visible: printJob
// FIXED-LINE-HEIGHT:
height: Math.round(18 * screenScaleFactor) // TODO: Theme!
verticalAlignment: Text.AlignVCenter
renderType: Text.NativeRendering
}
}
@ -116,11 +110,10 @@ Item
radius: 2 * screenScaleFactor // TODO: Theme!
}
Label
UM.Label
{
id: printerAssignmentLabel
anchors.verticalCenter: parent.verticalCenter
color: UM.Theme.getColor("text")
elide: Text.ElideRight
font: UM.Theme.getFont("medium") // 14pt, regular
text: {
@ -143,8 +136,6 @@ Item
// FIXED-LINE-HEIGHT:
height: parent.height
verticalAlignment: Text.AlignVCenter
renderType: Text.NativeRendering
}
Row
@ -186,17 +177,15 @@ Item
height: Math.round(72 * screenScaleFactor) // TODO: Theme!
}
Label {
UM.Label
{
text: printJob && printJob.owner ? printJob.owner : ""
color: UM.Theme.getColor("text")
elide: Text.ElideRight
font: UM.Theme.getFont("medium") // 14pt, regular
anchors.top: printerConfiguration.top
// FIXED-LINE-HEIGHT:
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.Controls.Styles 1.3
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
@ -34,7 +34,7 @@ Item
width: UM.Theme.getSize("monitor_progress_bar").width
}
Label
UM.Label
{
id: percentLabel
anchors
@ -46,14 +46,11 @@ Item
text: printJob ? Math.round(printJob.progress * 100) + "%" : "0%"
color: printJob && printJob.isActive ? UM.Theme.getColor("text") : UM.Theme.getColor("monitor_text_disabled")
width: contentWidth
font: UM.Theme.getFont("default") // 12pt, regular
// FIXED-LINE-HEIGHT:
height: UM.Theme.getSize("monitor_text_line").height
verticalAlignment: Text.AlignVCenter
renderType: Text.NativeRendering
}
Label
UM.Label
{
id: statusLabel
anchors
@ -62,8 +59,6 @@ Item
leftMargin: UM.Theme.getSize("monitor_margin").width
verticalCenter: parent.verticalCenter
}
color: UM.Theme.getColor("text")
font: UM.Theme.getFont("default")
text:
{
if (!printJob)
@ -104,7 +99,5 @@ Item
// FIXED-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.Controls 2.0
import QtQuick.Dialogs 1.1
import UM 1.3 as UM
import UM 1.5 as UM
import Cura 1.0 as Cura
/**
@ -100,10 +100,9 @@ Item
width: parent.width
radius: 2 * screenScaleFactor // TODO: Theme!
Label
UM.Label
{
text: printer && printer.name ? printer.name : ""
color: UM.Theme.getColor("text")
elide: Text.ElideRight
font: UM.Theme.getFont("large") // 16pt, bold
width: parent.width
@ -111,8 +110,6 @@ Item
// FIXED-LINE-HEIGHT:
height: parent.height
verticalAlignment: Text.AlignVCenter
renderType: Text.NativeRendering
}
}
@ -138,21 +135,20 @@ Item
Item
{
id: managePrinterLink
anchors {
anchors
{
top: printerFamilyPill.bottom
topMargin: UM.Theme.getSize("narrow_margin").height
}
height: 18 * screenScaleFactor // TODO: Theme!
width: childrenRect.width
Label
UM.Label
{
id: managePrinterText
anchors.verticalCenter: managePrinterLink.verticalCenter
color: UM.Theme.getColor("text_link")
font: UM.Theme.getFont("default")
text: catalog.i18nc("@label link to Connect and Cloud interfaces", "Manage printer")
renderType: Text.NativeRendering
}
UM.RecolorImage
{
@ -334,7 +330,7 @@ Item
height: childrenRect.height
spacing: 18 * screenScaleFactor // TODO: Theme!
Label
UM.Label
{
id: printerStatus
anchors
@ -371,7 +367,6 @@ Item
return ""
}
visible: text !== ""
renderType: Text.NativeRendering
}
Item
@ -401,7 +396,7 @@ Item
height: printerNameLabel.height + printerFamilyPill.height + 6 * screenScaleFactor // TODO: Theme!
visible: printer && printer.activePrintJob && !printerStatus.visible
Label
UM.Label
{
id: printerJobNameLabel
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:
height: 18 * screenScaleFactor // TODO: Theme!
verticalAlignment: Text.AlignVCenter
renderType: Text.NativeRendering
}
Label
UM.Label
{
id: printerJobOwnerLabel
anchors
@ -427,14 +420,11 @@ Item
}
color: printer && printer.activePrintJob && printer.activePrintJob.isActive ? UM.Theme.getColor("text") : UM.Theme.getColor("monitor_text_disabled")
elide: Text.ElideRight
font: UM.Theme.getFont("default") // 12pt, regular
text: printer && printer.activePrintJob ? printer.activePrintJob.owner : catalog.i18nc("@label", "Anonymous")
width: parent.width
// FIXED-LINE-HEIGHT:
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
}
Label
UM.Label
{
anchors
{
verticalCenter: parent.verticalCenter
}
font: UM.Theme.getFont("default")
text: catalog.i18nc("@label:status", "Requires configuration changes")
visible: printer && printer.activePrintJob && printer.activePrintJob.configurationChanges.length > 0 && !printerStatus.visible
color: UM.Theme.getColor("text")
// FIXED-LINE-HEIGHT:
height: 18 * screenScaleFactor // TODO: Theme!
verticalAlignment: Text.AlignVCenter
renderType: Text.NativeRendering
}
}
@ -487,17 +473,15 @@ Item
radius: 2 * screenScaleFactor // Todo: Theme!
}
}
contentItem: Label
contentItem: UM.Label
{
anchors.fill: parent
anchors.bottomMargin: 2 * screenScaleFactor // TODO: Theme!
color: UM.Theme.getColor("monitor_secondary_button_text")
font: UM.Theme.getFont("medium") // 14pt, regular
text: catalog.i18nc("@action:button", "Details");
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignHCenter
height: 18 * screenScaleFactor // TODO: Theme!
renderType: Text.NativeRendering
}
implicitHeight: 32 * 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.
import QtQuick 2.2
import QtQuick.Controls 2.0
import QtQuick.Controls.Styles 1.4
import UM 1.3 as UM
import UM 1.5 as UM
Button {
background: Rectangle {
opacity: parent.down || parent.hovered ? 1 : 0;
Button
{
background: Rectangle
{
opacity: parent.down || parent.hovered ? 1 : 0
color: UM.Theme.getColor("monitor_context_menu_hover")
}
contentItem: Label {
color: enabled ? UM.Theme.getColor("text") : UM.Theme.getColor("monitor_text_disabled");
contentItem: UM.Label
{
color: enabled ? UM.Theme.getColor("text") : UM.Theme.getColor("monitor_text_disabled")
text: parent.text
horizontalAlignment: Text.AlignLeft;
verticalAlignment: Text.AlignVCenter;
renderType: Text.NativeRendering;
horizontalAlignment: Text.AlignLeft
}
height: visible ? 39 * screenScaleFactor : 0; // TODO: Theme!
hoverEnabled: true;
width: parent.width;
height: visible ? 39 * screenScaleFactor : 0 // TODO: Theme!
hoverEnabled: true
width: parent.width
}

View file

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

View file

@ -4,7 +4,7 @@
import QtQuick 2.10
import QtQuick.Controls 2.3
import UM 1.4 as UM
import UM 1.5 as UM
import Cura 1.1 as Cura
Column
@ -12,14 +12,12 @@ Column
spacing: UM.Theme.getSize("default_margin").width
padding: UM.Theme.getSize("default_margin").width
Label
UM.Label
{
id: title
anchors.horizontalCenter: parent.horizontalCenter
renderType: Text.NativeRendering
text: catalog.i18nc("@label", "Sign in to the Ultimaker platform")
font: UM.Theme.getFont("large_bold")
color: UM.Theme.getColor("text")
}
Image
@ -33,16 +31,13 @@ Column
verticalAlignment: Image.AlignVCenter
}
Label
UM.Label
{
id: generalInformationPoints
anchors.horizontalCenter: parent.horizontalCenter
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")
lineHeight: 1.4
font: UM.Theme.getFont("default")
color: UM.Theme.getColor("text")
}
Cura.PrimaryButton

View file

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

View file

@ -4,7 +4,7 @@
import QtQuick 2.10
import QtQuick.Controls 2.3
import UM 1.4 as UM
import UM 1.5 as UM
import Cura 1.1 as Cura
Column
@ -41,16 +41,13 @@ Column
anchors.verticalCenter: parent.verticalCenter
color: UM.Theme.getColor("action_button_disabled")
visible: !avatar.hasAvatar
Label
UM.Label
{
id: initialLabel
anchors.centerIn: parent
text: profile["username"].charAt(0).toUpperCase()
font: UM.Theme.getFont("large_bold")
color: UM.Theme.getColor("text")
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignHCenter
renderType: Text.NativeRendering
}
}
@ -62,25 +59,22 @@ Column
spacing: UM.Theme.getSize("narrow_margin").height
width: childrenRect.width
height: childrenRect.height
Label
UM.Label
{
id: username
renderType: Text.NativeRendering
text: profile.username
font: UM.Theme.getFont("large_bold")
color: UM.Theme.getColor("text")
}
SyncState
{
id: syncRow
}
Label
UM.Label
{
id: lastSyncLabel
renderType: Text.NativeRendering
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")
}
}

View file

@ -5,7 +5,7 @@ import QtQuick 2.7
import QtQuick.Controls 2.1
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
@ -127,18 +127,16 @@ Button
elideWidth: buttonText.width
}
Label
UM.Label
{
id: buttonText
text: button.text
color: button.enabled ? (button.hovered ? button.textHoverColor : button.textColor): button.textDisabledColor
font: UM.Theme.getFont("medium")
visible: text != ""
renderType: Text.NativeRendering
height: parent.height
anchors.verticalCenter: parent.verticalCenter
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
elide: Text.ElideRight
Binding

View file

@ -4,7 +4,7 @@
import QtQuick 2.10
import QtQuick.Controls 2.3
import UM 1.4 as UM
import UM 1.5 as UM
import Cura 1.1 as Cura
Button
@ -73,7 +73,7 @@ Button
}
}
Label
UM.Label
{
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
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
wrapMode: Text.Wrap
elide: Text.ElideRight
color: UM.Theme.getColor("text")
}
}
}

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -5,7 +5,7 @@ import QtQuick 2.7
import QtQuick.Controls 2.0
import QtQuick.Layouts 1.3
import UM 1.2 as UM
import UM 1.5 as UM
import Cura 1.0 as Cura
// 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
font: UM.Theme.getFont("default")
color: UM.Theme.getColor("text")
renderType: Text.NativeRendering
elide: Text.ElideRight
verticalAlignment: Text.AlignVCenter
anchors
{
left: icon.right

View file

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

View file

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

View file

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

View file

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

View file

@ -19,14 +19,13 @@ Item
width: parent.width
height: childrenRect.height
Label
UM.Label
{
id: header
text: catalog.i18nc("@header", "Custom")
font: UM.Theme.getFont("medium")
color: UM.Theme.getColor("small_button_text")
height: contentHeight
renderType: Text.NativeRendering
anchors
{
@ -56,13 +55,11 @@ Item
topMargin: visible ? UM.Theme.getSize("default_margin").height : 0
}
Label
UM.Label
{
text: catalog.i18nc("@label", "Printer")
width: Math.round(parent.width * 0.3) - UM.Theme.getSize("default_margin").width
height: contentHeight
font: UM.Theme.getFont("default")
color: UM.Theme.getColor("text")
anchors.verticalCenter: printerTypeSelector.verticalCenter
anchors.left: parent.left
}
@ -208,15 +205,11 @@ Item
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.
Label
UM.Label
{
text: catalog.i18nc("@label", "Enabled")
verticalAlignment: Text.AlignVCenter
font: UM.Theme.getFont("default")
color: UM.Theme.getColor("text")
height: parent.height
width: selectors.textWidth
renderType: Text.NativeRendering
}
UM.CheckBox
@ -261,15 +254,11 @@ Item
height: visible ? UM.Theme.getSize("print_setup_big_item").height : 0
visible: Cura.MachineManager.activeMachine ? Cura.MachineManager.activeMachine.hasMaterials : false
Label
UM.Label
{
text: catalog.i18nc("@label", "Material")
verticalAlignment: Text.AlignVCenter
font: UM.Theme.getFont("default")
color: UM.Theme.getColor("text")
height: parent.height
width: selectors.textWidth
renderType: Text.NativeRendering
}
OldControls.ToolButton
@ -327,15 +316,11 @@ Item
height: visible ? UM.Theme.getSize("print_setup_big_item").height : 0
visible: Cura.MachineManager.activeMachine ? Cura.MachineManager.activeMachine.hasVariants : false
Label
UM.Label
{
text: Cura.MachineManager.activeDefinitionVariantsName
verticalAlignment: Text.AlignVCenter
font: UM.Theme.getFont("default")
color: UM.Theme.getColor("text")
height: parent.height
width: selectors.textWidth
renderType: Text.NativeRendering
}
OldControls.ToolButton
@ -371,11 +356,10 @@ Item
property bool buildplateCompatibilityWarning: Cura.MachineManager.variantBuildplateUsable
// This is a space holder aligning the warning messages.
Label
UM.Label
{
text: ""
width: selectors.textWidth
renderType: Text.NativeRendering
}
Item
@ -396,19 +380,15 @@ Item
visible: !Cura.MachineManager.isCurrentSetupSupported || warnings.buildplateCompatibilityError || warnings.buildplateCompatibilityWarning
}
Label
UM.Label
{
id: materialCompatibilityLabel
anchors.left: warningImage.right
anchors.leftMargin: UM.Theme.getSize("default_margin").width
verticalAlignment: Text.AlignVCenter
width: selectors.controlWidth - warningImage.width - UM.Theme.getSize("default_margin").width
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
wrapMode: Text.WordWrap
renderType: Text.NativeRendering
}
}
}

View file

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

View file

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

View file

@ -4,7 +4,7 @@
import QtQuick 2.10
import QtQuick.Controls 2.3
import UM 1.2 as UM
import UM 1.5 as UM
import Cura 1.0 as Cura
Item
@ -51,15 +51,13 @@ Item
source: objectSelector.opened ? UM.Theme.getIcon("ChevronSingleDown") : UM.Theme.getIcon("ChevronSingleUp")
}
Label
UM.Label
{
id: label
anchors.left: openCloseIcon.right
anchors.leftMargin: UM.Theme.getSize("default_margin").width
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")
renderType: Text.NativeRendering
elide: Text.ElideRight
}
}

View file

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

View file

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

View file

@ -4,7 +4,7 @@
import QtQuick 2.10
import QtQuick.Controls 2.3
import UM 1.2 as UM
import UM 1.5 as UM
import Cura 1.6 as Cura
Button
@ -40,14 +40,11 @@ Button
return txt
}
contentItem: Label
contentItem: UM.Label
{
id: textLabel
text: button.text != "" ? replaceText(button.text) : replaceText(button.labelText)
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")
}
}

View file

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

View file

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

View file

@ -4,7 +4,7 @@
import QtQuick 2.7
import QtQuick.Controls 2.3
import UM 1.0 as UM
import UM 1.5 as UM
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.
}
Label
UM.Label
{
id: label
x: UM.Theme.getSize("tooltip_margins").width
y: UM.Theme.getSize("tooltip_margins").height
width: base.width - UM.Theme.getSize("tooltip_margins").width * 2
wrapMode: Text.Wrap;
wrapMode: Text.Wrap
textFormat: Text.RichText
font: UM.Theme.getFont("default");
color: UM.Theme.getColor("tooltip_text");
renderType: Text.NativeRendering
color: UM.Theme.getColor("tooltip_text")
}
}
}

View file

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

View file

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

View file

@ -4,7 +4,7 @@
import QtQuick 2.7
import QtQuick.Controls 2.3
import UM 1.2 as UM
import UM 1.5 as UM
import Cura 1.0 as Cura
ListView
@ -14,16 +14,14 @@ ListView
section.property: "hasRemoteConnection"
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")
width: parent.width
height: UM.Theme.getSize("action_button").height
leftPadding: UM.Theme.getSize("default_margin").width
renderType: Text.NativeRendering
font: UM.Theme.getFont("medium")
color: UM.Theme.getColor("text_medium")
verticalAlignment: Text.AlignVCenter
}
delegate: MachineSelectorButton

View file

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

View file

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

View file

@ -4,17 +4,13 @@
import QtQuick 2.7
import QtQuick.Controls 2.0
import UM 1.2 as UM
import UM 1.5 as UM
SettingItem
{
contents: Label
contents: UM.Label
{
anchors.fill: parent
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.Styles 1.4
import UM 1.2 as UM
import UM 1.5 as UM
OldControls.TableView
@ -15,7 +15,7 @@ OldControls.TableView
{
height: tableCellLabel.implicitHeight
Label
UM.Label
{
id: tableCellLabel
color: styleData.selected ? UM.Theme.getColor("primary_button_text") : UM.Theme.getColor("text")
@ -23,7 +23,6 @@ OldControls.TableView
text: styleData.value
anchors.fill: parent
anchors.leftMargin: 10 * screenScaleFactor
verticalAlignment: Text.AlignVCenter
}
}

View file

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

View file

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

View file

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

View file

@ -4,7 +4,7 @@
import QtQuick 2.10
import QtQuick.Controls 2.3
import UM 1.3 as UM
import UM 1.5 as UM
import Cura 1.1 as Cura
//
@ -34,16 +34,13 @@ Item
anchors.right: parent.right
anchors.top: parent.top
Label
UM.Label
{
id: noPrinterLabel
height: UM.Theme.getSize("setting_control").height + UM.Theme.getSize("default_margin").height
anchors.left: parent.left
anchors.leftMargin: UM.Theme.getSize("default_margin").width
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.
}
@ -107,16 +104,13 @@ Item
{
id: sectionHeading
Label
UM.Label
{
anchors.left: parent.left
anchors.leftMargin: UM.Theme.getSize("default_margin").width
height: UM.Theme.getSize("setting_control").height
text: section
font: UM.Theme.getFont("default")
color: UM.Theme.getColor("small_button_text")
verticalAlignment: Text.AlignVCenter
renderType: Text.NativeRendering
}
}
@ -233,7 +227,7 @@ Item
source: UM.Theme.getIcon("LinkExternal")
}
Label
UM.Label
{
id: troubleshootingLabel
anchors.right: parent.right
@ -241,8 +235,6 @@ Item
text: catalog.i18nc("@label", "Troubleshooting")
font: UM.Theme.getFont("default")
color: UM.Theme.getColor("text_link")
linkColor: UM.Theme.getColor("text_link")
renderType: Text.NativeRendering
}
MouseArea

View file

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

View file

@ -4,7 +4,7 @@
import QtQuick 2.10
import QtQuick.Controls 2.3
import UM 1.3 as UM
import UM 1.5 as UM
import Cura 1.1 as Cura
import ".."
@ -46,16 +46,14 @@ Cura.RoundedRectangle
onClicked: base.clicked()
}
Label
UM.Label
{
id: title
anchors.left: parent.left
anchors.leftMargin: UM.Theme.getSize("default_margin").width
anchors.verticalCenter: parent.verticalCenter
verticalAlignment: Text.AlignVCenter
text: base.title
font: UM.Theme.getFont("medium")
renderType: Text.NativeRendering
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.Controls 2.3
import UM 1.3 as UM
import UM 1.5 as UM
import Cura 1.1 as Cura
@ -88,14 +88,12 @@ Item
{
id: emptyComponent
Label
UM.Label
{
text: catalog.i18nc("@label", "Empty")
height: UM.Theme.getSize("action_button").height
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
font: UM.Theme.getFont("medium")
renderType: Text.NativeRendering
}
}
}

View file

@ -4,7 +4,7 @@
import QtQuick 2.10
import QtQuick.Controls 2.3
import UM 1.3 as UM
import UM 1.5 as UM
import Cura 1.1 as Cura
//
@ -14,7 +14,7 @@ Item
{
UM.I18nCatalog { id: catalog; name: "cura" }
Label
UM.Label
{
id: titleLabel
anchors.top: parent.top
@ -23,10 +23,9 @@ Item
text: catalog.i18nc("@label", "User Agreement")
color: UM.Theme.getColor("primary_button")
font: UM.Theme.getFont("huge")
renderType: Text.NativeRendering
}
Label
UM.Label
{
id: disclaimerLineLabel
anchors
@ -44,8 +43,6 @@ Item
textFormat: Text.RichText
wrapMode: Text.WordWrap
font: UM.Theme.getFont("medium")
color: UM.Theme.getColor("text")
renderType: Text.NativeRendering
}
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.
import QtQuick 2.10
import QtQuick.Controls 2.3
import UM 1.3 as UM
import UM 1.5 as UM
import Cura 1.1 as Cura
@ -64,14 +64,11 @@ CheckBox
}
}
contentItem: Label
contentItem: UM.Label
{
id: textLabel
leftPadding: control.indicator.width + control.spacing
text: control.text
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.Controls 2.3
import UM 1.3 as UM
import UM 1.5 as UM
import Cura 1.1 as Cura
@ -65,7 +65,7 @@ ComboBox
color: UM.Theme.getColor("setting_control_button")
}
contentItem: Label
contentItem: UM.Label
{
id: contentLabel
anchors.left: parent.left
@ -86,11 +86,8 @@ ComboBox
}
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")
elide: Text.ElideRight
verticalAlignment: Text.AlignVCenter
}
popup: Popup
@ -140,7 +137,7 @@ ComboBox
return (typeof _val !== 'undefined') ? _val : ""
}
contentItem: Label
contentItem: UM.Label
{
id: delegateLabel
// 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
textFormat: Text.PlainText
renderType: Text.NativeRendering
color: UM.Theme.getColor("setting_control_text")
font: UM.Theme.getFont("default")
elide: Text.ElideRight
verticalAlignment: Text.AlignVCenter
}
background: UM.TooltipArea

View file

@ -4,7 +4,7 @@
import QtQuick 2.10
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 labelFont: notificationLabel.font
Label
UM.Label
{
id: notificationLabel
anchors.fill: parent
color: UM.Theme.getColor("primary_text")
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
// 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.Controls 2.3
import UM 1.3 as UM
import UM 1.5 as UM
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
text: radioButton.text
font: radioButton.font
color: UM.Theme.getColor("text")
renderType: Text.NativeRendering
}
}