overlay: make volume mixer has both output and input

This commit is contained in:
end-4
2025-11-07 18:33:32 +01:00
parent 2c88a71eed
commit 843025bc64
4 changed files with 45 additions and 6 deletions
@@ -50,7 +50,7 @@ StyledOverlayWidget {
fill: parent
margins: parent.padding
}
spacing: 10
spacing: 8
SecondaryTabBar {
id: tabBar
@@ -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 }
}
}
}
}