1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-28 07:22:50 -05:00

feat: Display persistent OSD percentage option

This commit is contained in:
purian23
2025-10-04 22:02:25 -04:00
parent df2469468b
commit ad44f09421
6 changed files with 31 additions and 4 deletions

View File

@@ -17,6 +17,7 @@ Item {
property bool isDragging: false
property bool wheelEnabled: true
property real valueOverride: -1
property bool alwaysShowValue: false
readonly property bool containsMouse: sliderMouseArea.containsMouse
property color thumbOutlineColor: Theme.surfaceContainer
@@ -239,7 +240,7 @@ Item {
anchors.bottom: parent.top
anchors.bottomMargin: Theme.spacingM
x: Math.max(0, Math.min(parent.width - width, sliderHandle.x + sliderHandle.width/2 - width/2))
visible: (sliderMouseArea.containsMouse && slider.showValue) || (slider.isDragging && slider.showValue)
visible: slider.alwaysShowValue ? slider.showValue : ((sliderMouseArea.containsMouse && slider.showValue) || (slider.isDragging && slider.showValue))
opacity: visible ? 1 : 0
StyledText {