mirror of
https://github.com/kossLAN/dots.git
synced 2025-11-04 22:49:50 -05:00
feat: proper volume control center, still not done though
This commit is contained in:
parent
102fa853a8
commit
99eb6956bd
10 changed files with 140 additions and 256 deletions
|
|
@ -2,7 +2,6 @@ pragma ComponentBehavior: Bound
|
|||
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import QtQuick.Controls
|
||||
import Quickshell.Widgets
|
||||
import Quickshell.Services.Pipewire
|
||||
import qs.widgets
|
||||
|
|
@ -13,34 +12,34 @@ Loader {
|
|||
active: node != null
|
||||
|
||||
required property PwNode node
|
||||
property string label: node.nickname
|
||||
property string label: node.nickname ?? node.name
|
||||
|
||||
sourceComponent: WrapperRectangle {
|
||||
id: comp
|
||||
color: ShellSettings.colors.surface_container_translucent
|
||||
radius: 12
|
||||
property Component leftWidget
|
||||
|
||||
PwObjectTracker {
|
||||
id: tracker
|
||||
objects: [root.node]
|
||||
}
|
||||
|
||||
sourceComponent: WrapperItem {
|
||||
margin: 6
|
||||
|
||||
border {
|
||||
width: 1
|
||||
color: ShellSettings.colors.active_translucent
|
||||
}
|
||||
|
||||
// property Component button
|
||||
// property Component icon
|
||||
|
||||
PwObjectTracker {
|
||||
id: tracker
|
||||
objects: [root.node]
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
spacing: 10
|
||||
|
||||
Loader {
|
||||
id: leftWidget
|
||||
sourceComponent: root.leftWidget
|
||||
Layout.preferredWidth: this.height
|
||||
Layout.fillHeight: true
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: true
|
||||
|
||||
Text {
|
||||
text: root.label
|
||||
text: root.label
|
||||
color: ShellSettings.colors.active
|
||||
elide: Text.ElideRight
|
||||
Layout.fillWidth: true
|
||||
|
|
@ -49,8 +48,6 @@ Loader {
|
|||
|
||||
StyledSlider {
|
||||
value: root.node.audio.volume ?? 0
|
||||
// text: root.text
|
||||
// icon: root.icon
|
||||
|
||||
onValueChanged: {
|
||||
// only allow changes when the node is ready other wise you will combust
|
||||
|
|
@ -64,42 +61,6 @@ Loader {
|
|||
Layout.fillHeight: true
|
||||
}
|
||||
}
|
||||
|
||||
// StyledMouseArea {
|
||||
// id: rightArrow
|
||||
// Layout.preferredWidth: rightArrow.height
|
||||
// // Layout.fillWidth: true
|
||||
// Layout.fillHeight: true
|
||||
//
|
||||
// IconImage {
|
||||
// source: "root:resources/general/right-arrow.svg"
|
||||
// anchors.fill: parent
|
||||
// }
|
||||
// }
|
||||
|
||||
// Loader {
|
||||
// id: buttonLoader
|
||||
// sourceComponent: root.button
|
||||
//
|
||||
// Layout.preferredWidth: this.height
|
||||
// Layout.fillHeight: true
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
// sourceComponent: VolumeCard {
|
||||
// id: sinkCard
|
||||
// node: sinkLoader.sink
|
||||
// button: StyledMouseArea {
|
||||
// property bool checked: !sinkCard.node.audio.muted
|
||||
//
|
||||
// // IconImage {}
|
||||
//
|
||||
// onClicked: {
|
||||
// sinkCard.node.audio.muted = !sinkCard.node.audio.muted;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// anchors.fill: parent
|
||||
// }
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue