From 9ada66a78ea58d8b498f1dd26bf0783e1a442c51 Mon Sep 17 00:00:00 2001 From: Laurens Duin <85798751+Laurens256@users.noreply.github.com> Date: Tue, 5 Aug 2025 08:04:53 +0200 Subject: bar/popouts: add audio device switcher (#319) * feat: basic audio switcher * feat: replace VerticalSlider with StyledSlider * fix: styling * fix: formatting * chore: make sound icons consistent, change slider styling * feat: styled slider component variants * chore: cleanup * chore: cleanup * fix: pr fixes * fix: remove redundant code * chore: remove old code * fix: controls styling * fixes * more tweaks * radiobtn: add interaction stuff Anim slider --------- Co-authored-by: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> --- modules/osd/Content.qml | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) (limited to 'modules/osd/Content.qml') diff --git a/modules/osd/Content.qml b/modules/osd/Content.qml index 3177ee9..29b1b39 100644 --- a/modules/osd/Content.qml +++ b/modules/osd/Content.qml @@ -1,6 +1,7 @@ import qs.components.controls import qs.services import qs.config +import qs.utils import QtQuick Column { @@ -26,18 +27,10 @@ Column { Audio.setVolume(Audio.volume - 0.1); } - VerticalSlider { + FilledSlider { anchors.fill: parent - icon: { - if (Audio.muted) - return "no_sound"; - if (value >= 0.5) - return "volume_up"; - if (value > 0) - return "volume_down"; - return "volume_mute"; - } + icon: Icons.getVolumeIcon(value, Audio.muted) value: Audio.volume onMoved: Audio.setVolume(value) } @@ -57,7 +50,7 @@ Column { monitor.setBrightness(monitor.brightness - 0.1); } - VerticalSlider { + FilledSlider { anchors.fill: parent icon: `brightness_${(Math.round(value * 6) + 1)}` -- cgit v1.2.3-freya