fix: performance cpu/gpu name overlapping usage

Fixes #1337
This commit is contained in:
2 * r + 2 * t 2026-03-30 01:41:26 +11:00
parent 5c59e4490a
commit 1f3656c2f6

View file

@ -358,32 +358,29 @@ Item {
anchors.left: parent.left
anchors.top: parent.top
anchors.bottom: parent.bottom
width: parent.width * heroCard.animatedUsage
implicitWidth: parent.width * heroCard.animatedUsage
color: Qt.alpha(heroCard.accentColor, 0.15)
}
ColumnLayout {
anchors.fill: parent
anchors.leftMargin: Appearance.padding.large
anchors.rightMargin: Appearance.padding.large
anchors.topMargin: Appearance.padding.normal
anchors.bottomMargin: Appearance.padding.normal
spacing: Appearance.spacing.small
CardHeader {
anchors.left: parent.left
anchors.top: parent.top
anchors.leftMargin: Appearance.padding.large
anchors.topMargin: Math.round(Appearance.padding.large * 1.2)
width: parent.width - anchors.leftMargin - usageColumn.anchors.rightMargin - usageLabel.width - Appearance.spacing.normal
icon: heroCard.icon
title: heroCard.title
accentColor: heroCard.accentColor
}
RowLayout {
Layout.fillWidth: true
Layout.fillHeight: true
spacing: Appearance.spacing.normal
Column {
Layout.alignment: Qt.AlignBottom
Layout.fillWidth: true
anchors.left: parent.left
anchors.right: parent.right
anchors.bottom: parent.bottom
anchors.margins: Math.round(Appearance.padding.large * 1.2)
anchors.bottomMargin: Math.round(Appearance.padding.large * 1.3)
spacing: Appearance.spacing.small
Row {
@ -404,21 +401,17 @@ Item {
}
ProgressBar {
width: parent.width * 0.5
height: 6
implicitWidth: parent.width * 0.5
implicitHeight: 6
value: heroCard.tempProgress
fgColor: heroCard.accentColor
bgColor: Qt.alpha(heroCard.accentColor, 0.2)
}
}
Item {
Layout.fillWidth: true
}
}
}
Column {
id: usageColumn
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
anchors.margins: Appearance.padding.large
@ -426,6 +419,8 @@ Item {
spacing: 0
StyledText {
id: usageLabel
anchors.right: parent.right
text: heroCard.mainLabel
font.pointSize: Appearance.font.size.normal