Rearrange for tidier structure (#2212)

This commit is contained in:
clsty
2025-10-16 07:19:55 +08:00
parent 13065d7e5a
commit 8b493e091d
529 changed files with 165 additions and 138 deletions
@@ -0,0 +1,40 @@
import qs.modules.common
import qs.modules.common.functions
import qs.modules.common.widgets
import QtQuick
Item {
id: root
required property string iconName
required property double percentage
property int warningThreshold: 100
implicitHeight: resourceProgress.implicitHeight
implicitWidth: Appearance.sizes.verticalBarWidth
property bool warning: percentage * 100 >= warningThreshold
ClippedFilledCircularProgress {
id: resourceProgress
anchors.centerIn: parent
value: percentage
enableAnimation: false
colPrimary: root.warning ? Appearance.colors.colError : Appearance.colors.colOnSecondaryContainer
accountForLightBleeding: !root.warning
MaterialSymbol {
font.weight: Font.Medium
fill: 1
text: root.iconName
iconSize: 13
color: Appearance.colors.colOnSecondaryContainer
}
}
MouseArea {
id: mouseArea
anchors.fill: parent
hoverEnabled: true
acceptedButtons: Qt.NoButton
enabled: root.visible
}
}