mirror of
https://github.com/kossLAN/dots.git
synced 2025-11-05 06:59:50 -05:00
fix: file permissions that got messed up
This commit is contained in:
parent
c48aca3d0c
commit
f59fe534cf
10 changed files with 190 additions and 137 deletions
|
|
@ -3,8 +3,9 @@ pragma ComponentBehavior: Bound
|
|||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import Quickshell.Services.Pipewire
|
||||
import "../../widgets/" as Widgets
|
||||
import "../.."
|
||||
import Quickshell.Widgets
|
||||
import qs
|
||||
import qs.widgets
|
||||
|
||||
ColumnLayout {
|
||||
id: root
|
||||
|
|
@ -13,7 +14,7 @@ ColumnLayout {
|
|||
// don't load until the node is not null
|
||||
Loader {
|
||||
id: sinkLoader
|
||||
active: sink !== null
|
||||
active: sink !== null
|
||||
Layout.preferredWidth: 350
|
||||
Layout.preferredHeight: 45
|
||||
|
||||
|
|
@ -22,11 +23,11 @@ ColumnLayout {
|
|||
sourceComponent: VolumeCard {
|
||||
id: sinkCard
|
||||
node: sinkLoader.sink
|
||||
button: Widgets.FontIconButton {
|
||||
hoverEnabled: false
|
||||
iconName: sinkCard.node.audio.muted ? "volume_off" : "volume_up"
|
||||
checked: !sinkCard.node.audio.muted
|
||||
inactiveColor: ShellSettings.colors["surface_container_highest"]
|
||||
button: StyledMouseArea {
|
||||
property bool checked: !sinkCard.node.audio.muted
|
||||
|
||||
// IconImage {}
|
||||
|
||||
onClicked: {
|
||||
sinkCard.node.audio.muted = !sinkCard.node.audio.muted;
|
||||
}
|
||||
|
|
@ -39,7 +40,7 @@ ColumnLayout {
|
|||
// microphone, same as above
|
||||
Loader {
|
||||
id: sourceLoader
|
||||
active: source !== null
|
||||
active: source !== null
|
||||
Layout.preferredWidth: 350
|
||||
Layout.preferredHeight: 45
|
||||
|
||||
|
|
@ -48,11 +49,11 @@ ColumnLayout {
|
|||
sourceComponent: VolumeCard {
|
||||
id: sourceCard
|
||||
node: sourceLoader.source
|
||||
button: Widgets.FontIconButton {
|
||||
hoverEnabled: false
|
||||
iconName: sourceCard.node.audio.muted ? "mic_off" : "mic"
|
||||
checked: !sourceCard.node.audio.muted
|
||||
inactiveColor: ShellSettings.colors["surface_container_highest"]
|
||||
button: StyledMouseArea {
|
||||
property bool checked: !sourceCard.node.audio.muted
|
||||
|
||||
// IconImage {}
|
||||
|
||||
onClicked: {
|
||||
sourceCard.node.audio.muted = !sourceCard.node.audio.muted;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,50 +1,80 @@
|
|||
pragma ComponentBehavior: Bound
|
||||
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import QtQuick.Controls
|
||||
import Quickshell.Widgets
|
||||
import Quickshell.Services.Pipewire
|
||||
import "../../widgets/" as Widgets
|
||||
import "../.."
|
||||
import qs
|
||||
import qs.widgets
|
||||
|
||||
WrapperRectangle {
|
||||
Loader {
|
||||
id: root
|
||||
color: ShellSettings.colors["surface_container"]
|
||||
radius: width / 2
|
||||
margin: 6
|
||||
active: node !== null
|
||||
|
||||
required property PwNode node
|
||||
property string text
|
||||
property Component button
|
||||
property Component icon
|
||||
|
||||
PwObjectTracker {
|
||||
id: tracker
|
||||
objects: [root.node]
|
||||
}
|
||||
sourceComponent: WrapperRectangle {
|
||||
id: comp
|
||||
color: ShellSettings.colors.surface_container_translucent
|
||||
radius: 12
|
||||
margin: 6
|
||||
|
||||
RowLayout {
|
||||
Widgets.MaterialSlider {
|
||||
value: root.node.audio.volume ?? 0
|
||||
text: root.text
|
||||
icon: root.icon
|
||||
border {
|
||||
width: 1
|
||||
color: ShellSettings.colors.active_translucent
|
||||
}
|
||||
|
||||
onValueChanged: {
|
||||
// only allow changes when the node is ready other wise you will combust
|
||||
if (!root.node.ready)
|
||||
return;
|
||||
// property string text
|
||||
// property Component button
|
||||
// property Component icon
|
||||
|
||||
root.node.audio.volume = value;
|
||||
PwObjectTracker {
|
||||
id: tracker
|
||||
objects: [root.node]
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
Slider {
|
||||
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
|
||||
if (!root.node.ready)
|
||||
return;
|
||||
|
||||
root.node.audio.volume = value;
|
||||
}
|
||||
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: true
|
||||
}
|
||||
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: true
|
||||
}
|
||||
|
||||
Loader {
|
||||
id: buttonLoader
|
||||
sourceComponent: root.button
|
||||
|
||||
Layout.preferredWidth: this.height
|
||||
Layout.fillHeight: true
|
||||
// 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
|
||||
// }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,32 +3,34 @@ pragma ComponentBehavior: Bound
|
|||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import Quickshell.Widgets
|
||||
import "../../widgets/" as Widgets
|
||||
import qs.widgets
|
||||
|
||||
WrapperItem {
|
||||
id: root
|
||||
visible: false
|
||||
DeviceMixer {}
|
||||
|
||||
ColumnLayout {
|
||||
spacing: 10
|
||||
|
||||
Widgets.TabBar {
|
||||
id: tabBar
|
||||
model: ["headphones", "tune"]
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: 35
|
||||
}
|
||||
|
||||
StackLayout {
|
||||
id: page
|
||||
currentIndex: tabBar.currentIndex
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: currentItem ? currentItem.implicitHeight : 0
|
||||
|
||||
readonly property Item currentItem: children[currentIndex]
|
||||
|
||||
DeviceMixer {}
|
||||
ApplicationMixer {}
|
||||
}
|
||||
}
|
||||
}
|
||||
// WrapperItem {
|
||||
// id: root
|
||||
//
|
||||
// ColumnLayout {
|
||||
// spacing: 10
|
||||
//
|
||||
// // TabBar {
|
||||
// // id: tabBar
|
||||
// // model: ["headphones", "tune"]
|
||||
// // Layout.fillWidth: true
|
||||
// // Layout.preferredHeight: 35
|
||||
// // }
|
||||
//
|
||||
//
|
||||
// // StackLayout {
|
||||
// // id: page
|
||||
// // currentIndex: tabBar.currentIndex
|
||||
// // Layout.fillWidth: true
|
||||
// // Layout.preferredHeight: currentItem ? currentItem.implicitHeight : 0
|
||||
// //
|
||||
// // readonly property Item currentItem: children[currentIndex]
|
||||
// //
|
||||
// // DeviceMixer {}
|
||||
// // ApplicationMixer {}
|
||||
// // }
|
||||
// }
|
||||
// }
|
||||
|
|
|
|||
|
|
@ -1,27 +1,65 @@
|
|||
pragma ComponentBehavior: Bound
|
||||
|
||||
import QtQuick
|
||||
import "../../widgets/" as Widgets
|
||||
import QtQuick.Layouts
|
||||
import Quickshell.Widgets
|
||||
import Quickshell.Services.Pipewire
|
||||
import qs.widgets
|
||||
import qs.bar
|
||||
|
||||
Item {
|
||||
StyledMouseArea {
|
||||
id: root
|
||||
onClicked: showMenu = !showMenu
|
||||
|
||||
required property var popup
|
||||
required property var bar
|
||||
property bool showMenu: false
|
||||
|
||||
Widgets.FontIconButton {
|
||||
id: button
|
||||
iconName: "volume_up"
|
||||
anchors.fill: parent
|
||||
onClicked: {
|
||||
if (root.popup.content == volumeMenu) {
|
||||
root.popup.hide();
|
||||
return;
|
||||
}
|
||||
IconImage {
|
||||
id: icon
|
||||
source: "root:resources/volume/volume-full.svg"
|
||||
|
||||
root.popup.set(this, volumeMenu);
|
||||
root.popup.show();
|
||||
anchors {
|
||||
fill: parent
|
||||
margins: 2
|
||||
}
|
||||
}
|
||||
|
||||
VolumeControl {
|
||||
id: volumeMenu
|
||||
property PopupItem menu: PopupItem {
|
||||
id: menu
|
||||
owner: root
|
||||
popup: root.bar.popup
|
||||
show: root.showMenu
|
||||
onClosed: root.showMenu = false
|
||||
|
||||
implicitWidth: 300
|
||||
implicitHeight: container.implicitHeight + (2 * 8)
|
||||
|
||||
// implicitWidth: volumeMenu.implicitWidth
|
||||
// implicitHeight: volumeMenu.implicitHeight
|
||||
|
||||
// VolumeControl {
|
||||
// id: volumeMenu
|
||||
// }
|
||||
|
||||
ColumnLayout {
|
||||
id: container
|
||||
|
||||
anchors {
|
||||
fill: parent
|
||||
margins: 8
|
||||
}
|
||||
|
||||
VolumeCard {
|
||||
node: Pipewire.defaultAudioSink
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: 45
|
||||
}
|
||||
|
||||
VolumeCard {
|
||||
node: Pipewire.defaultAudioSource
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: 45
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue