mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-07 14:04:03 -06:00
Render labels using Text.QtRendering
on OSX
Fonts were looking a bit to thick on when using `Text.NativeRendering`, so using `Text.QtRendering` instead. After this the font weight looks identical to figma (as far as I can see). In this commit I also changed all `Label`'s to `UM.Label`'s and removed default properties where I could. CURA-9154
This commit is contained in:
parent
35f5c3f959
commit
d5c0fde7f2
56 changed files with 129 additions and 337 deletions
|
@ -5,7 +5,7 @@ import QtQuick 2.15
|
|||
import QtQuick.Controls 2.3
|
||||
import QtQuick.Layouts 1.3
|
||||
|
||||
import UM 1.3 as UM
|
||||
import UM 1.5 as UM
|
||||
import Cura 1.5 as Cura
|
||||
|
||||
|
||||
|
@ -61,7 +61,7 @@ Item
|
|||
}
|
||||
}
|
||||
|
||||
Label
|
||||
UM.Label
|
||||
{
|
||||
id: titleLabel
|
||||
anchors.top: parent.top
|
||||
|
@ -70,7 +70,6 @@ Item
|
|||
text: catalog.i18nc("@label", "Add printer by IP address")
|
||||
color: UM.Theme.getColor("primary_button")
|
||||
font: UM.Theme.getFont("huge")
|
||||
renderType: Text.NativeRendering
|
||||
}
|
||||
|
||||
Item
|
||||
|
@ -88,17 +87,13 @@ Item
|
|||
anchors.right: parent.right
|
||||
anchors.margins: UM.Theme.getSize("default_margin").width
|
||||
|
||||
Label
|
||||
UM.Label
|
||||
{
|
||||
id: explainLabel
|
||||
height: contentHeight
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.top: parent.top
|
||||
|
||||
font: UM.Theme.getFont("default")
|
||||
color: UM.Theme.getColor("text")
|
||||
renderType: Text.NativeRendering
|
||||
text: catalog.i18nc("@label", "Enter the IP address of your printer on the network.")
|
||||
}
|
||||
|
||||
|
@ -136,7 +131,7 @@ Item
|
|||
onAccepted: addPrinterButton.clicked()
|
||||
}
|
||||
|
||||
Label
|
||||
UM.Label
|
||||
{
|
||||
id: invalidInputLabel
|
||||
anchors.top: hostnameField.bottom
|
||||
|
@ -144,9 +139,6 @@ Item
|
|||
anchors.left: parent.left
|
||||
visible: false
|
||||
text: catalog.i18nc("@text", "Please enter a valid IP address.")
|
||||
font: UM.Theme.getFont("default")
|
||||
color: UM.Theme.getColor("text")
|
||||
renderType: Text.NativeRendering
|
||||
}
|
||||
|
||||
Cura.SecondaryButton
|
||||
|
@ -188,14 +180,11 @@ Item
|
|||
anchors.top: userInputFields.bottom
|
||||
anchors.margins: UM.Theme.getSize("default_margin").width
|
||||
|
||||
Label
|
||||
UM.Label
|
||||
{
|
||||
id: waitResponseLabel
|
||||
anchors.top: parent.top
|
||||
anchors.margins: UM.Theme.getSize("default_margin").width
|
||||
font: UM.Theme.getFont("default")
|
||||
color: UM.Theme.getColor("text")
|
||||
renderType: Text.NativeRendering
|
||||
|
||||
visible: addPrinterByIpScreen.hasRequestInProgress || (addPrinterByIpScreen.hasRequestFinished && !addPrinterByIpScreen.isPrinterDiscovered)
|
||||
textFormat: Text.RichText
|
||||
|
@ -225,18 +214,15 @@ Item
|
|||
|
||||
visible: addPrinterByIpScreen.isPrinterDiscovered
|
||||
|
||||
Label
|
||||
UM.Label
|
||||
{
|
||||
id: printerNameLabel
|
||||
anchors.top: parent.top
|
||||
font: UM.Theme.getFont("large")
|
||||
color: UM.Theme.getColor("text")
|
||||
renderType: Text.NativeRendering
|
||||
|
||||
text: !addPrinterByIpScreen.isPrinterDiscovered ? "???" : addPrinterByIpScreen.discoveredPrinter.name
|
||||
}
|
||||
|
||||
Label
|
||||
UM.Label
|
||||
{
|
||||
id: printerCannotBeAddedLabel
|
||||
width: parent.width
|
||||
|
@ -245,8 +231,6 @@ Item
|
|||
text: catalog.i18nc("@label", "This printer cannot be added because it's an unknown printer or it's not the host of a group.")
|
||||
visible: addPrinterByIpScreen.hasRequestFinished && !addPrinterByIpScreen.canAddPrinter
|
||||
font: UM.Theme.getFont("default_bold")
|
||||
color: UM.Theme.getColor("text")
|
||||
renderType: Text.NativeRendering
|
||||
wrapMode: Text.WordWrap
|
||||
}
|
||||
|
||||
|
@ -258,52 +242,33 @@ Item
|
|||
columns: 2
|
||||
columnSpacing: UM.Theme.getSize("default_margin").width
|
||||
|
||||
Label
|
||||
UM.Label
|
||||
{
|
||||
text: catalog.i18nc("@label", "Type")
|
||||
font: UM.Theme.getFont("default")
|
||||
color: UM.Theme.getColor("text")
|
||||
renderType: Text.NativeRendering
|
||||
}
|
||||
Label
|
||||
UM.Label
|
||||
{
|
||||
id: typeText
|
||||
text: !addPrinterByIpScreen.isPrinterDiscovered ? "?" : addPrinterByIpScreen.discoveredPrinter.readableMachineType
|
||||
font: UM.Theme.getFont("default")
|
||||
color: UM.Theme.getColor("text")
|
||||
renderType: Text.NativeRendering
|
||||
}
|
||||
|
||||
Label
|
||||
UM.Label
|
||||
{
|
||||
text: catalog.i18nc("@label", "Firmware version")
|
||||
font: UM.Theme.getFont("default")
|
||||
color: UM.Theme.getColor("text")
|
||||
renderType: Text.NativeRendering
|
||||
}
|
||||
Label
|
||||
UM.Label
|
||||
{
|
||||
id: firmwareText
|
||||
text: !addPrinterByIpScreen.isPrinterDiscovered ? "0.0.0.0" : addPrinterByIpScreen.discoveredPrinter.device.getProperty("firmware_version")
|
||||
font: UM.Theme.getFont("default")
|
||||
color: UM.Theme.getColor("text")
|
||||
renderType: Text.NativeRendering
|
||||
}
|
||||
|
||||
Label
|
||||
UM.Label
|
||||
{
|
||||
text: catalog.i18nc("@label", "Address")
|
||||
font: UM.Theme.getFont("default")
|
||||
color: UM.Theme.getColor("text")
|
||||
renderType: Text.NativeRendering
|
||||
}
|
||||
Label
|
||||
UM.Label
|
||||
{
|
||||
id: addressText
|
||||
text: !addPrinterByIpScreen.isPrinterDiscovered ? "0.0.0.0" : addPrinterByIpScreen.discoveredPrinter.address
|
||||
font: UM.Theme.getFont("default")
|
||||
color: UM.Theme.getColor("text")
|
||||
renderType: Text.NativeRendering
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue