mirror of
https://github.com/end-4/dots-hyprland.git
synced 2026-06-05 14:59:27 -05:00
osd: make brightness icon go speen speen
This commit is contained in:
@@ -104,6 +104,7 @@ Scope {
|
||||
anchors.centerIn: parent
|
||||
value: brightnessMonitor.brightness
|
||||
icon: "light_mode"
|
||||
rotateIcon: true
|
||||
name: qsTr("Brightness")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,6 +13,7 @@ Item {
|
||||
required property real value
|
||||
required property string icon
|
||||
required property string name
|
||||
property bool rotateIcon: false
|
||||
|
||||
property real valueIndicatorVerticalPadding: 5
|
||||
property real valueIndicatorLeftPadding: 10
|
||||
@@ -33,14 +34,38 @@ Item {
|
||||
Layout.margins: 10
|
||||
spacing: 10
|
||||
|
||||
MaterialSymbol { // Icon
|
||||
Item {
|
||||
implicitWidth: 30
|
||||
implicitHeight: 30
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
Layout.leftMargin: valueIndicatorLeftPadding
|
||||
Layout.topMargin: valueIndicatorVerticalPadding
|
||||
Layout.bottomMargin: valueIndicatorVerticalPadding
|
||||
color: Appearance.colors.colOnLayer0
|
||||
text: root.icon
|
||||
iconSize: 30
|
||||
MaterialSymbol { // Icon
|
||||
anchors.centerIn: parent
|
||||
color: Appearance.colors.colOnLayer0
|
||||
renderType: Text.QtRendering
|
||||
|
||||
text: root.icon
|
||||
iconSize: 20 + 10 * (root.rotateIcon ? value : 1)
|
||||
rotation: 180 * (root.rotateIcon ? value : 0)
|
||||
|
||||
Behavior on iconSize {
|
||||
NumberAnimation {
|
||||
duration: Appearance.animation.elementMoveEnter.duration
|
||||
easing.type: Appearance.animation.elementMoveEnter.type
|
||||
easing.bezierCurve: Appearance.animation.elementMoveEnter.bezierCurve
|
||||
}
|
||||
}
|
||||
Behavior on rotation {
|
||||
NumberAnimation {
|
||||
duration: Appearance.animation.elementMoveEnter.duration
|
||||
easing.type: Appearance.animation.elementMoveEnter.type
|
||||
easing.bezierCurve: Appearance.animation.elementMoveEnter.bezierCurve
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
ColumnLayout { // Stuff
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
|
||||
Reference in New Issue
Block a user