mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-13 17:57:55 -06:00
Replace more instances of label with UM.Label
This commit is contained in:
parent
8195b9be28
commit
a68584cda1
6 changed files with 35 additions and 86 deletions
|
@ -55,7 +55,7 @@ Item
|
|||
}
|
||||
}
|
||||
|
||||
Label
|
||||
UM.Label
|
||||
{
|
||||
id: title
|
||||
anchors
|
||||
|
@ -66,10 +66,8 @@ Item
|
|||
}
|
||||
text: details === null ? "" : (details.name || "")
|
||||
font: UM.Theme.getFont("large_bold")
|
||||
color: UM.Theme.getColor("text")
|
||||
width: contentWidth
|
||||
height: contentHeight
|
||||
renderType: Text.NativeRendering
|
||||
}
|
||||
|
||||
Column
|
||||
|
@ -84,33 +82,26 @@ Item
|
|||
spacing: Math.floor(UM.Theme.getSize("narrow_margin").height)
|
||||
width: childrenRect.width
|
||||
height: childrenRect.height
|
||||
Label
|
||||
UM.Label
|
||||
{
|
||||
text: catalog.i18nc("@label", "Version") + ":"
|
||||
font: UM.Theme.getFont("default")
|
||||
color: UM.Theme.getColor("text_medium")
|
||||
renderType: Text.NativeRendering
|
||||
}
|
||||
Label
|
||||
UM.Label
|
||||
{
|
||||
text: catalog.i18nc("@label", "Last updated") + ":"
|
||||
font: UM.Theme.getFont("default")
|
||||
color: UM.Theme.getColor("text_medium")
|
||||
renderType: Text.NativeRendering
|
||||
}
|
||||
Label
|
||||
UM.Label
|
||||
{
|
||||
text: catalog.i18nc("@label", "Brand") + ":"
|
||||
font: UM.Theme.getFont("default")
|
||||
color: UM.Theme.getColor("text_medium")
|
||||
renderType: Text.NativeRendering
|
||||
}
|
||||
Label
|
||||
UM.Label
|
||||
{
|
||||
text: catalog.i18nc("@label", "Downloads") + ":"
|
||||
font: UM.Theme.getFont("default")
|
||||
color: UM.Theme.getColor("text_medium")
|
||||
renderType: Text.NativeRendering
|
||||
}
|
||||
}
|
||||
Column
|
||||
|
@ -125,14 +116,11 @@ Item
|
|||
}
|
||||
spacing: Math.floor(UM.Theme.getSize("narrow_margin").height)
|
||||
height: childrenRect.height
|
||||
Label
|
||||
UM.Label
|
||||
{
|
||||
text: details === null ? "" : (details.version || catalog.i18nc("@label", "Unknown"))
|
||||
font: UM.Theme.getFont("default")
|
||||
color: UM.Theme.getColor("text")
|
||||
renderType: Text.NativeRendering
|
||||
}
|
||||
Label
|
||||
UM.Label
|
||||
{
|
||||
text:
|
||||
{
|
||||
|
@ -143,11 +131,8 @@ Item
|
|||
var date = new Date(details.last_updated)
|
||||
return date.toLocaleString(UM.Preferences.getValue("general/language"))
|
||||
}
|
||||
font: UM.Theme.getFont("default")
|
||||
color: UM.Theme.getColor("text")
|
||||
renderType: Text.NativeRendering
|
||||
}
|
||||
Label
|
||||
UM.Label
|
||||
{
|
||||
text:
|
||||
{
|
||||
|
@ -160,18 +145,11 @@ Item
|
|||
return "<a href=\"" + details.website + "\">" + details.author_name + "</a>"
|
||||
}
|
||||
}
|
||||
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
|
||||
}
|
||||
Label
|
||||
UM.Label
|
||||
{
|
||||
text: details === null ? "" : (details.download_count || catalog.i18nc("@label", "Unknown"))
|
||||
font: UM.Theme.getFont("default")
|
||||
color: UM.Theme.getColor("text")
|
||||
renderType: Text.NativeRendering
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@ import QtQuick 2.10
|
|||
import QtQuick.Controls 2.3
|
||||
import QtQuick.Layouts 1.3
|
||||
|
||||
import UM 1.2 as UM
|
||||
import UM 1.5 as UM
|
||||
|
||||
// The labelBar shows a set of labels that are evenly spaced from one another.
|
||||
// The first item is aligned to the left, the last is aligned to the right.
|
||||
|
@ -34,13 +34,10 @@ Item
|
|||
Layout.maximumWidth: Math.round(index + 1 === repeater.count || repeater.count <= 1 ? itemSize : base.width / (repeater.count - 1))
|
||||
height: label.height
|
||||
|
||||
Label
|
||||
UM.Label
|
||||
{
|
||||
id: label
|
||||
text: model[modelKey]
|
||||
color: UM.Theme.getColor("text")
|
||||
font: UM.Theme.getFont("default")
|
||||
renderType: Text.NativeRendering
|
||||
height: contentHeight
|
||||
anchors
|
||||
{
|
||||
|
|
|
@ -6,7 +6,7 @@ import QtQuick.Controls 2.3
|
|||
import QtQuick.Controls.Styles 1.4
|
||||
import QtQuick.Layouts 1.3
|
||||
|
||||
import UM 1.2 as UM
|
||||
import UM 1.5 as UM
|
||||
import Cura 1.0 as Cura
|
||||
|
||||
|
||||
|
@ -77,46 +77,37 @@ Cura.ExpandablePopup
|
|||
rightMargin: UM.Theme.getSize("default_margin").width
|
||||
}
|
||||
// Label for the brand of the material
|
||||
Label
|
||||
UM.Label
|
||||
{
|
||||
id: materialBrandNameLabel
|
||||
|
||||
text: model.material_brand + " " + model.material_name
|
||||
elide: Text.ElideRight
|
||||
font: UM.Theme.getFont("default")
|
||||
color: UM.Theme.getColor("text")
|
||||
renderType: Text.NativeRendering
|
||||
width: parent.width
|
||||
visible: !truncated
|
||||
}
|
||||
|
||||
Label
|
||||
UM.Label
|
||||
{
|
||||
id: materialNameLabel
|
||||
|
||||
text: model.material_name
|
||||
elide: Text.ElideRight
|
||||
font: UM.Theme.getFont("default")
|
||||
color: UM.Theme.getColor("text")
|
||||
renderType: Text.NativeRendering
|
||||
width: parent.width
|
||||
visible: !materialBrandNameLabel.visible && !truncated
|
||||
}
|
||||
|
||||
Label
|
||||
UM.Label
|
||||
{
|
||||
id: materialTypeLabel
|
||||
|
||||
text: model.material_type
|
||||
elide: Text.ElideRight
|
||||
font: UM.Theme.getFont("default")
|
||||
color: UM.Theme.getColor("text")
|
||||
renderType: Text.NativeRendering
|
||||
width: parent.width
|
||||
visible: !materialBrandNameLabel.visible && !materialNameLabel.visible
|
||||
}
|
||||
// Label that shows the name of the variant
|
||||
Label
|
||||
UM.Label
|
||||
{
|
||||
id: variantLabel
|
||||
|
||||
|
@ -125,8 +116,6 @@ Cura.ExpandablePopup
|
|||
text: model.variant
|
||||
elide: Text.ElideRight
|
||||
font: UM.Theme.getFont("default_bold")
|
||||
color: UM.Theme.getColor("text")
|
||||
renderType: Text.NativeRendering
|
||||
Layout.preferredWidth: parent.width
|
||||
}
|
||||
}
|
||||
|
@ -135,13 +124,11 @@ Cura.ExpandablePopup
|
|||
}
|
||||
|
||||
// Placeholder text if there is a configuration to select but no materials (so we can't show the materials per extruder).
|
||||
Label
|
||||
UM.Label
|
||||
{
|
||||
text: catalog.i18nc("@label", "Select configuration")
|
||||
elide: Text.ElideRight
|
||||
font: UM.Theme.getFont("medium")
|
||||
color: UM.Theme.getColor("text")
|
||||
renderType: Text.NativeRendering
|
||||
|
||||
visible: Cura.MachineManager.activeMachine ? !Cura.MachineManager.activeMachine.hasMaterials && (Cura.MachineManager.activeMachine.hasVariants || Cura.MachineManager.activeMachine.hasVariantBuildplates) : false
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ import QtQuick 2.7
|
|||
import QtQuick.Controls 1.4
|
||||
import QtQuick.Window 2.1
|
||||
|
||||
import UM 1.2 as UM
|
||||
import UM 1.5 as UM
|
||||
import Cura 1.0 as Cura
|
||||
|
||||
|
||||
|
@ -72,7 +72,7 @@ UM.ManagementPage
|
|||
visible: base.currentItem != null
|
||||
anchors.fill: parent
|
||||
|
||||
Label
|
||||
UM.Label
|
||||
{
|
||||
id: machineName
|
||||
text: base.currentItem && base.currentItem.name ? base.currentItem.name : ""
|
||||
|
|
|
@ -7,7 +7,7 @@ import QtQuick.Dialogs 1.2
|
|||
import QtQuick.Layouts 1.15
|
||||
import QtQuick.Window 2.1
|
||||
import Cura 1.1 as Cura
|
||||
import UM 1.4 as UM
|
||||
import UM 1.5 as UM
|
||||
|
||||
Window
|
||||
{
|
||||
|
@ -42,17 +42,15 @@ Window
|
|||
anchors.fill: parent
|
||||
anchors.margins: UM.Theme.getSize("default_margin").width
|
||||
|
||||
Label
|
||||
UM.Label
|
||||
{
|
||||
text: catalog.i18nc("@title:header", "Sync materials with printers")
|
||||
font: UM.Theme.getFont("large_bold")
|
||||
color: UM.Theme.getColor("text")
|
||||
}
|
||||
Label
|
||||
UM.Label
|
||||
{
|
||||
text: catalog.i18nc("@text", "Following a few simple steps, you will be able to synchronize all your material profiles with your printers.")
|
||||
font: UM.Theme.getFont("medium")
|
||||
color: UM.Theme.getColor("text")
|
||||
wrapMode: Text.Wrap
|
||||
width: parent.width
|
||||
}
|
||||
|
@ -125,18 +123,16 @@ Window
|
|||
anchors.fill: parent
|
||||
anchors.margins: UM.Theme.getSize("default_margin").width
|
||||
|
||||
Label
|
||||
UM.Label
|
||||
{
|
||||
text: catalog.i18nc("@title:header", "Sign in")
|
||||
font: UM.Theme.getFont("large_bold")
|
||||
color: UM.Theme.getColor("text")
|
||||
Layout.preferredHeight: height
|
||||
}
|
||||
Label
|
||||
UM.Label
|
||||
{
|
||||
text: catalog.i18nc("@text", "To automatically sync the material profiles with all your printers connected to Digital Factory you need to be signed in in Cura.")
|
||||
font: UM.Theme.getFont("medium")
|
||||
color: UM.Theme.getColor("text")
|
||||
wrapMode: Text.Wrap
|
||||
width: parent.width
|
||||
Layout.maximumWidth: width
|
||||
|
@ -223,13 +219,12 @@ Window
|
|||
height: width
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
Label
|
||||
UM.Label
|
||||
{
|
||||
id: printerListHeader
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
//Text is always defined by the states above.
|
||||
font: UM.Theme.getFont("large_bold")
|
||||
color: UM.Theme.getColor("text")
|
||||
}
|
||||
}
|
||||
Row
|
||||
|
@ -237,7 +232,7 @@ Window
|
|||
Layout.preferredWidth: parent.width
|
||||
Layout.preferredHeight: childrenRect.height
|
||||
|
||||
Label
|
||||
UM.Label
|
||||
{
|
||||
id: syncStatusLabel
|
||||
|
||||
|
@ -247,7 +242,6 @@ Window
|
|||
elide: Text.ElideRight
|
||||
visible: text !== ""
|
||||
text: ""
|
||||
color: UM.Theme.getColor("text")
|
||||
font: UM.Theme.getFont("medium")
|
||||
}
|
||||
Cura.TertiaryButton
|
||||
|
@ -426,14 +420,13 @@ Window
|
|||
|
||||
spacing: UM.Theme.getSize("default_margin").height
|
||||
|
||||
Label
|
||||
UM.Label
|
||||
{
|
||||
id: printersMissingText
|
||||
text: catalog.i18nc("@text Asking the user whether printers are missing in a list.", "Printers missing?")
|
||||
+ "\n"
|
||||
+ catalog.i18nc("@text", "Make sure all your printers are turned ON and connected to Digital Factory.")
|
||||
font: UM.Theme.getFont("medium")
|
||||
color: UM.Theme.getColor("text")
|
||||
elide: Text.ElideRight
|
||||
}
|
||||
Cura.TertiaryButton
|
||||
|
@ -540,7 +533,7 @@ Window
|
|||
running: true
|
||||
}
|
||||
}
|
||||
Label
|
||||
UM.Label
|
||||
{
|
||||
id: syncingLabel
|
||||
anchors.left: syncingIcon.right
|
||||
|
@ -561,11 +554,10 @@ Window
|
|||
anchors.margins: UM.Theme.getSize("default_margin").width
|
||||
visible: cloudPrinterList.count == 0
|
||||
|
||||
Label
|
||||
UM.Label
|
||||
{
|
||||
text: catalog.i18nc("@title:header", "No printers found")
|
||||
font: UM.Theme.getFont("large_bold")
|
||||
color: UM.Theme.getColor("text")
|
||||
Layout.preferredWidth: width
|
||||
Layout.preferredHeight: height
|
||||
}
|
||||
|
@ -577,7 +569,7 @@ Window
|
|||
Layout.alignment: Qt.AlignHCenter
|
||||
Layout.preferredWidth: parent.width / 3
|
||||
}
|
||||
Label
|
||||
UM.Label
|
||||
{
|
||||
text: catalog.i18nc("@text", "It seems like you don't have access to any printers connected to Digital Factory.")
|
||||
width: parent.width
|
||||
|
@ -642,18 +634,16 @@ Window
|
|||
anchors.fill: parent
|
||||
anchors.margins: UM.Theme.getSize("default_margin").width
|
||||
|
||||
Label
|
||||
UM.Label
|
||||
{
|
||||
text: catalog.i18nc("@title:header", "Sync material profiles via USB")
|
||||
font: UM.Theme.getFont("large_bold")
|
||||
color: UM.Theme.getColor("text")
|
||||
Layout.preferredHeight: height
|
||||
}
|
||||
Label
|
||||
UM.Label
|
||||
{
|
||||
text: catalog.i18nc("@text In the UI this is followed by a list of steps the user needs to take.", "Follow the following steps to load the new material profiles to your printer.")
|
||||
font: UM.Theme.getFont("medium")
|
||||
color: UM.Theme.getColor("text")
|
||||
wrapMode: Text.Wrap
|
||||
width: parent.width
|
||||
Layout.maximumWidth: width
|
||||
|
@ -674,13 +664,12 @@ Window
|
|||
anchors.verticalCenter: parent.verticalCenter
|
||||
sourceSize.width: width
|
||||
}
|
||||
Label
|
||||
UM.Label
|
||||
{
|
||||
text: "1. " + catalog.i18nc("@text", "Click the export material archive button.")
|
||||
+ "\n2. " + catalog.i18nc("@text", "Save the .umm file on a USB stick.")
|
||||
+ "\n3. " + catalog.i18nc("@text", "Insert the USB stick into your printer and launch the procedure to load new material profiles.")
|
||||
font: UM.Theme.getFont("medium")
|
||||
color: UM.Theme.getColor("text")
|
||||
wrapMode: Text.Wrap
|
||||
width: parent.width * 2 / 3 - UM.Theme.getSize("default_margin").width
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
|
|
|
@ -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
|
||||
|
||||
SettingItem
|
||||
{
|
||||
|
@ -90,7 +90,7 @@ SettingItem
|
|||
opacity: !control.hovered ? 0 : propertyProvider.properties.validationState == "ValidatorState.Valid" ? 1.0 : 0.35
|
||||
}
|
||||
|
||||
Label
|
||||
UM.Label
|
||||
{
|
||||
anchors
|
||||
{
|
||||
|
@ -105,9 +105,7 @@ SettingItem
|
|||
//However the setting value is aligned, align the unit opposite. That way it stays readable with right-to-left languages.
|
||||
horizontalAlignment: (input.effectiveHorizontalAlignment == Text.AlignLeft) ? Text.AlignRight : Text.AlignLeft
|
||||
textFormat: Text.PlainText
|
||||
renderType: Text.NativeRendering
|
||||
color: UM.Theme.getColor("setting_unit")
|
||||
font: UM.Theme.getFont("default")
|
||||
}
|
||||
|
||||
TextInput
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue