diff options
| author | Robin Seger <pixelkhaos@gmail.com> | 2025-10-13 13:50:56 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-10-13 22:50:56 +1100 |
| commit | dde0f85e78755fa50902f29a4bca6d29ae345867 (patch) | |
| tree | 363a0e1d2c45add224ef974f270e76ac174c50d4 /services | |
| parent | [CI] chore: update flake (diff) | |
| download | caelestia-shell-dde0f85e78755fa50902f29a4bca6d29ae345867.tar.gz caelestia-shell-dde0f85e78755fa50902f29a4bca6d29ae345867.tar.bz2 caelestia-shell-dde0f85e78755fa50902f29a4bca6d29ae345867.zip | |
feat: configurable max volume (#723)
* feat: configurable max volume
- Add maxVolume config option to ServiceConfig
- Add maxValue property to FilledSlider component
- Update OSD sliders to respect maxVolume setting
- Update example config in README
* fix: remove redundant maxValue prop
Diffstat (limited to 'services')
| -rw-r--r-- | services/Audio.qml | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/services/Audio.qml b/services/Audio.qml index bc87d46..71ccb86 100644 --- a/services/Audio.qml +++ b/services/Audio.qml @@ -44,7 +44,7 @@ Singleton { function setVolume(newVolume: real): void { if (sink?.ready && sink?.audio) { sink.audio.muted = false; - sink.audio.volume = Math.max(0, Math.min(1, newVolume)); + sink.audio.volume = Math.max(0, Math.min(Config.services.maxVolume, newVolume)); } } @@ -59,7 +59,7 @@ Singleton { function setSourceVolume(newVolume: real): void { if (source?.ready && source?.audio) { source.audio.muted = false; - source.audio.volume = Math.max(0, Math.min(1, newVolume)); + source.audio.volume = Math.max(0, Math.min(Config.services.maxVolume, newVolume)); } } |