Revert "Render labels using Text.QtRendering on OSX"

This reverts commit f0e3c19a34.
This commit is contained in:
c.lamboo 2022-05-10 15:39:02 +02:00
parent f0e3c19a34
commit 35f5c3f959
56 changed files with 337 additions and 129 deletions

View file

@ -42,13 +42,16 @@ UM.Dialog
source: UM.Theme.getIcon("Certificate", "high")
}
UM.Label
Label
{
text: catalog.i18nc("@text", "Please read and agree with the plugin licence.")
color: UM.Theme.getColor("text")
font: UM.Theme.getFont("large")
anchors.verticalCenter: icon.verticalCenter
height: UM.Theme.getSize("marketplace_large_icon").height
verticalAlignment: Qt.AlignmentFlag.AlignVCenter
wrapMode: Text.Wrap
renderType: Text.NativeRendering
}
}

View file

@ -6,7 +6,7 @@ import QtQuick.Controls 2.15
import QtQuick.Layouts 1.15
import QtQuick.Window 2.2
import UM 1.5 as UM
import UM 1.2 as UM
import Cura 1.6 as Cura
Window
@ -67,7 +67,7 @@ Window
Layout.preferredWidth: parent.width
Layout.preferredHeight: childrenRect.height + UM.Theme.getSize("default_margin").height
UM.Label
Label
{
id: pageTitle
anchors
@ -80,6 +80,7 @@ Window
}
font: UM.Theme.getFont("large")
color: UM.Theme.getColor("text")
text: content.item ? content.item.pageTitle: catalog.i18nc("@title", "Loading...")
}
}

View file

@ -29,13 +29,16 @@ Rectangle
anchors.fill: parent
UM.Label
Label
{
id: descriptionLabel
width: parent.width
text: packageData.description
font: UM.Theme.getFont("default")
color: UM.Theme.getColor("text")
maximumLineCount: 2
wrapMode: Text.Wrap
elide: Text.ElideRight
visible: text !== ""
}

View file

@ -87,10 +87,11 @@ Item
Layout.preferredWidth: parent.width
Layout.preferredHeight: childrenRect.height
UM.Label
Label
{
text: packageData.displayName
font: UM.Theme.getFont("medium_bold")
color: UM.Theme.getColor("text")
verticalAlignment: Text.AlignTop
}
VerifiedIcon
@ -99,10 +100,12 @@ Item
visible: packageData.isCheckedByUltimaker
}
UM.Label
Label
{
id: packageVersionLabel
text: packageData.packageVersion
font: UM.Theme.getFont("default")
color: UM.Theme.getColor("text")
Layout.fillWidth: true
}
@ -152,11 +155,14 @@ Item
spacing: UM.Theme.getSize("narrow_margin").width
// label "By"
UM.Label
Label
{
id: authorBy
Layout.alignment: Qt.AlignCenter
text: catalog.i18nc("@label", "By")
font: UM.Theme.getFont("default")
color: UM.Theme.getColor("text")
}
// clickable author name

View file

@ -45,13 +45,14 @@ Item
iconSize: height - leftPadding * 2
}
UM.Label
Label
{
Layout.alignment: Qt.AlignmentFlag.AlignVCenter
Layout.fillWidth: true
text: detailPage.title
font: UM.Theme.getFont("large")
color: UM.Theme.getColor("text")
}
}

View file

@ -56,9 +56,13 @@ Rectangle
color: UM.Theme.getColor("text")
}
UM.Label
Label
{
anchors.verticalCenter: downloadsIcon.verticalCenter
color: UM.Theme.getColor("text")
font: UM.Theme.getFont("default")
text: packageData.downloadCount
}
}
@ -74,22 +78,25 @@ Rectangle
topPadding: 0
spacing: UM.Theme.getSize("default_margin").height
UM.Label
Label
{
width: parent.width - parent.padding * 2
text: catalog.i18nc("@header", "Description")
font: UM.Theme.getFont("medium_bold")
color: UM.Theme.getColor("text")
elide: Text.ElideRight
}
UM.Label
Label
{
width: parent.width - parent.padding * 2
text: packageData.formattedDescription
font: UM.Theme.getFont("medium")
color: UM.Theme.getColor("text")
linkColor: UM.Theme.getColor("text_link")
wrapMode: Text.Wrap
textFormat: Text.RichText
onLinkActivated: UM.UrlUtil.openUrl(link, ["http", "https"])
@ -103,12 +110,13 @@ Rectangle
visible: packageData.packageType === "material"
spacing: 0
UM.Label
Label
{
width: parent.width
text: catalog.i18nc("@header", "Compatible printers")
font: UM.Theme.getFont("medium_bold")
color: UM.Theme.getColor("text")
elide: Text.ElideRight
}
@ -116,23 +124,25 @@ Rectangle
{
model: packageData.compatiblePrinters
UM.Label
Label
{
width: compatiblePrinterColumn.width
text: modelData
font: UM.Theme.getFont("medium")
color: UM.Theme.getColor("text")
elide: Text.ElideRight
}
}
UM.Label
Label
{
width: parent.width
visible: packageData.compatiblePrinters.length == 0
text: "(" + catalog.i18nc("@info", "No compatibility information") + ")"
font: UM.Theme.getFont("medium")
color: UM.Theme.getColor("text")
elide: Text.ElideRight
}
}
@ -145,12 +155,13 @@ Rectangle
visible: packageData.packageType === "material"
spacing: 0
UM.Label
Label
{
width: parent.width
text: catalog.i18nc("@header", "Compatible support materials")
font: UM.Theme.getFont("medium_bold")
color: UM.Theme.getColor("text")
elide: Text.ElideRight
}
@ -158,23 +169,25 @@ Rectangle
{
model: packageData.compatibleSupportMaterials
UM.Label
Label
{
width: compatibleSupportMaterialColumn.width
text: modelData
font: UM.Theme.getFont("medium")
color: UM.Theme.getColor("text")
elide: Text.ElideRight
}
}
UM.Label
Label
{
width: parent.width
visible: packageData.compatibleSupportMaterials.length == 0
text: "(" + catalog.i18nc("@info No materials", "None") + ")"
font: UM.Theme.getFont("medium")
color: UM.Theme.getColor("text")
elide: Text.ElideRight
}
}
@ -186,21 +199,23 @@ Rectangle
visible: packageData.packageType === "material"
spacing: 0
UM.Label
Label
{
width: parent.width
text: catalog.i18nc("@header", "Compatible with Material Station")
font: UM.Theme.getFont("medium_bold")
color: UM.Theme.getColor("text")
elide: Text.ElideRight
}
UM.Label
Label
{
width: parent.width
text: packageData.isCompatibleMaterialStation ? catalog.i18nc("@info", "Yes") : catalog.i18nc("@info", "No")
font: UM.Theme.getFont("medium")
color: UM.Theme.getColor("text")
elide: Text.ElideRight
}
}
@ -212,21 +227,23 @@ Rectangle
visible: packageData.packageType === "material"
spacing: 0
UM.Label
Label
{
width: parent.width
text: catalog.i18nc("@header", "Optimized for Air Manager")
font: UM.Theme.getFont("medium_bold")
color: UM.Theme.getColor("text")
elide: Text.ElideRight
}
UM.Label
Label
{
width: parent.width
text: packageData.isCompatibleAirManager ? catalog.i18nc("@info", "Yes") : catalog.i18nc("@info", "No")
font: UM.Theme.getFont("medium")
color: UM.Theme.getColor("text")
elide: Text.ElideRight
}
}

View file

@ -3,7 +3,7 @@
import QtQuick 2.15
import QtQuick.Controls 2.15
import UM 1.5 as UM
import UM 1.0 as UM
TabButton
{
@ -22,10 +22,11 @@ TabButton
border.width: UM.Theme.getSize("thick_lining").width
}
contentItem: UM.Label
contentItem: Label
{
text: parent.text
font: UM.Theme.getFont("medium_bold")
color: UM.Theme.getColor("text")
width: contentWidth
anchors.centerIn: parent
}

View file

@ -40,7 +40,7 @@ ListView
color: UM.Theme.getColor("detail_background")
UM.Label
Label
{
id: sectionHeaderText
anchors.verticalCenter: parent.verticalCenter
@ -48,6 +48,7 @@ ListView
text: section
font: UM.Theme.getFont("large")
color: UM.Theme.getColor("text")
}
}