updates module + remove pixelSize usage

This commit is contained in:
Zacharias-Brohn
2026-02-25 18:13:09 +01:00
parent 11da456048
commit ed9e0d1c85
5 changed files with 44 additions and 64 deletions
+10 -9
View File
@@ -11,12 +11,11 @@ Item {
id: root
property color barColor: DynamicColors.palette.m3primary
property bool expanded: false
property color textColor: DynamicColors.palette.m3onSurface
anchors.bottom: parent.bottom
anchors.top: parent.top
implicitWidth: expanded ? 300 : 150
implicitWidth: 150
Behavior on implicitWidth {
NumberAnimation {
@@ -49,16 +48,18 @@ Item {
}
RowLayout {
anchors {
fill: parent
leftMargin: 10
rightMargin: 15
}
id: layout
anchors.left: parent.left
anchors.leftMargin: Appearance.padding.small
anchors.right: parent.right
anchors.rightMargin: Appearance.padding.small * 2
anchors.verticalCenter: parent.verticalCenter
MaterialIcon {
Layout.alignment: Qt.AlignVCenter
color: Audio.muted ? DynamicColors.palette.m3error : root.textColor
font.pixelSize: 18
font.pointSize: 14
text: Audio.muted ? "volume_off" : "volume_up"
}
@@ -91,7 +92,7 @@ Item {
MaterialIcon {
Layout.alignment: Qt.AlignVCenter
color: (Audio.sourceMuted ?? false) ? DynamicColors.palette.m3error : root.textColor
font.pixelSize: 18
font.pointSize: 14
text: Audio.sourceMuted ? "mic_off" : "mic"
}
+2 -2
View File
@@ -13,7 +13,7 @@ Item {
anchors.bottom: parent.bottom
anchors.top: parent.top
implicitWidth: 25
implicitWidth: 30
CustomRect {
anchors.bottomMargin: 3
@@ -30,7 +30,7 @@ Item {
anchors.centerIn: parent
color: iconColor
font.family: "Material Symbols Rounded"
font.pixelSize: 20
font.pointSize: 16
text: HasNotifications.hasNotifications ? "\uf4fe" : "\ue7f4"
Behavior on color {
+7 -8
View File
@@ -14,7 +14,7 @@ Item {
clip: true
implicitHeight: 34
implicitWidth: rowLayout.implicitWidth + rowLayout.anchors.leftMargin + rowLayout.anchors.rightMargin
implicitWidth: rowLayout.implicitWidth + Appearance.padding.small * 2
Rectangle {
id: backgroundRect
@@ -37,19 +37,18 @@ Item {
RowLayout {
id: rowLayout
anchors.fill: parent
anchors.leftMargin: 5
anchors.rightMargin: 5
anchors.centerIn: parent
spacing: 6
MaterialIcon {
Layout.alignment: Qt.AlignVCenter
color: DynamicColors.palette.m3onSurface
font.pixelSize: 18
font.pointSize: 14
text: "memory_alt"
}
Resource {
Layout.alignment: Qt.AlignVCenter
mainColor: DynamicColors.palette.m3primary
percentage: ResourceUsage.memoryUsedPercentage
warningThreshold: 95
@@ -58,7 +57,7 @@ Item {
MaterialIcon {
Layout.alignment: Qt.AlignVCenter
color: DynamicColors.palette.m3onSurface
font.pixelSize: 18
font.pointSize: 14
text: "memory"
}
@@ -71,7 +70,7 @@ Item {
MaterialIcon {
Layout.alignment: Qt.AlignVCenter
color: DynamicColors.palette.m3onSurface
font.pixelSize: 18
font.pointSize: 14
text: "gamepad"
}
@@ -83,7 +82,7 @@ Item {
MaterialIcon {
Layout.alignment: Qt.AlignVCenter
color: DynamicColors.palette.m3onSurface
font.pixelSize: 18
font.pointSize: 14
text: "developer_board"
}
+11 -33
View File
@@ -12,62 +12,40 @@ Item {
anchors.bottom: parent.bottom
anchors.top: parent.top
implicitWidth: textMetrics.width + contentRow.spacing + 30
implicitWidth: contentRow.childrenRect.width + Appearance.spacing.smaller
Rectangle {
CustomRect {
anchors.left: parent.left
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
color: DynamicColors.tPalette.m3surfaceContainer
implicitHeight: 22
radius: height / 2
Behavior on color {
CAnim {
}
}
}
RowLayout {
id: contentRow
spacing: 10
anchors.centerIn: parent
implicitHeight: 22
spacing: Appearance.spacing.small
anchors {
fill: parent
leftMargin: 5
rightMargin: 5
}
Text {
Layout.alignment: Qt.AlignVCenter | Qt.AlignLeft
color: root.textColor
font.family: "Material Symbols Rounded"
font.pixelSize: 18
text: "\uf569"
Behavior on color {
CAnim {
}
}
MaterialIcon {
Layout.alignment: Qt.AlignVCenter
font.pointSize: 14
text: "package_2"
}
TextMetrics {
id: textMetrics
font.pixelSize: 16
text: root.countUpdates
}
Text {
Layout.alignment: Qt.AlignVCenter | Qt.AlignRight
CustomText {
color: root.textColor
font.pointSize: 12
text: textMetrics.text
Behavior on color {
CAnim {
}
}
}
}
}