Cura/plugins/Marketplace/resources/qml/PackageCard.qml
c.lamboo d5c0fde7f2 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
2022-05-10 15:40:09 +02:00

50 lines
1.2 KiB
QML

// Copyright (c) 2021 Ultimaker B.V.
// Cura is released under the terms of the LGPLv3 or higher.
import QtQuick 2.15
import QtQuick.Controls 2.15
import QtQuick.Layouts 1.1
import UM 1.6 as UM
import Cura 1.6 as Cura
Rectangle
{
property alias packageData: packageCardHeader.packageData
property alias showUpdateButton: packageCardHeader.showUpdateButton
property alias showDisableButton: packageCardHeader.showDisableButton
property alias showInstallButton: packageCardHeader.showInstallButton
height: childrenRect.height
color: UM.Theme.getColor("main_background")
radius: UM.Theme.getSize("default_radius").width
PackageCardHeader
{
id: packageCardHeader
Item
{
id: shortDescription
anchors.fill: parent
UM.Label
{
id: descriptionLabel
width: parent.width
text: packageData.description
maximumLineCount: 2
elide: Text.ElideRight
visible: text !== ""
}
}
}
FontMetrics
{
id: fontMetrics
font: UM.Theme.getFont("default")
}
}