From 843025bc646048ba24f24cd21367c4b3d0171808 Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Fri, 7 Nov 2025 18:33:32 +0100 Subject: [PATCH] overlay: make volume mixer has both output and input --- .../ii/modules/common/Persistent.qml | 1 + .../modules/overlay/resources/Resources.qml | 2 +- .../overlay/volumeMixer/VolumeMixer.qml | 46 +++++++++++++++++-- .../volumeMixer/VolumeDialogContent.qml | 2 + 4 files changed, 45 insertions(+), 6 deletions(-) diff --git a/dots/.config/quickshell/ii/modules/common/Persistent.qml b/dots/.config/quickshell/ii/modules/common/Persistent.qml index 43da3467e..82670296e 100644 --- a/dots/.config/quickshell/ii/modules/common/Persistent.qml +++ b/dots/.config/quickshell/ii/modules/common/Persistent.qml @@ -105,6 +105,7 @@ Singleton { property bool clickthrough: false property real x: 80 property real y: 280 + property int tabIndex: 0 } } diff --git a/dots/.config/quickshell/ii/modules/overlay/resources/Resources.qml b/dots/.config/quickshell/ii/modules/overlay/resources/Resources.qml index 1b78b867e..fe32d2a91 100644 --- a/dots/.config/quickshell/ii/modules/overlay/resources/Resources.qml +++ b/dots/.config/quickshell/ii/modules/overlay/resources/Resources.qml @@ -50,7 +50,7 @@ StyledOverlayWidget { fill: parent margins: parent.padding } - spacing: 10 + spacing: 8 SecondaryTabBar { id: tabBar diff --git a/dots/.config/quickshell/ii/modules/overlay/volumeMixer/VolumeMixer.qml b/dots/.config/quickshell/ii/modules/overlay/volumeMixer/VolumeMixer.qml index 487f470b5..68c572579 100644 --- a/dots/.config/quickshell/ii/modules/overlay/volumeMixer/VolumeMixer.qml +++ b/dots/.config/quickshell/ii/modules/overlay/volumeMixer/VolumeMixer.qml @@ -1,7 +1,10 @@ import QtQuick +import QtQuick.Controls import QtQuick.Layouts import Quickshell +import qs.services import qs.modules.common +import qs.modules.common.widgets import qs.modules.overlay import qs.modules.sidebarRight.volumeMixer @@ -15,11 +18,44 @@ StyledOverlayWidget { implicitHeight: 600 implicitWidth: 350 - VolumeDialogContent { - anchors.fill: parent - anchors.margins: parent.padding - isSink: true - } + ColumnLayout { + id: contentColumn + anchors { + fill: parent + margins: parent.padding + } + spacing: 8 + SecondaryTabBar { + id: tabBar + + currentIndex: Persistent.states.overlay.volumeMixer.tabIndex + onCurrentIndexChanged: { + Persistent.states.overlay.volumeMixer.tabIndex = tabBar.currentIndex; + } + + SecondaryTabButton { + buttonIcon: "media_output" + buttonText: Translation.tr("Output") + } + SecondaryTabButton { + buttonIcon: "mic" + buttonText: Translation.tr("Input") + } + } + SwipeView { + id: swipeView + Layout.fillWidth: true + Layout.fillHeight: true + currentIndex: Persistent.states.overlay.volumeMixer.tabIndex + onCurrentIndexChanged: { + Persistent.states.overlay.volumeMixer.tabIndex = swipeView.currentIndex; + } + clip: true + + VolumeDialogContent { isSink: true } + VolumeDialogContent { isSink: false } + } + } } } diff --git a/dots/.config/quickshell/ii/modules/sidebarRight/volumeMixer/VolumeDialogContent.qml b/dots/.config/quickshell/ii/modules/sidebarRight/volumeMixer/VolumeDialogContent.qml index 56f524968..a276128d9 100644 --- a/dots/.config/quickshell/ii/modules/sidebarRight/volumeMixer/VolumeDialogContent.qml +++ b/dots/.config/quickshell/ii/modules/sidebarRight/volumeMixer/VolumeDialogContent.qml @@ -29,6 +29,7 @@ ColumnLayout { Layout.topMargin: -22 Layout.leftMargin: 0 Layout.rightMargin: 0 + color: Appearance.colors.colOutlineVariant } DialogSectionListView { @@ -56,6 +57,7 @@ ColumnLayout { Layout.topMargin: -22 Layout.leftMargin: 0 Layout.rightMargin: 0 + color: Appearance.colors.colOutlineVariant } DialogSectionListView {