replace wraperRectangle with normal rectangle
This commit is contained in:
parent
bc0fab6cb0
commit
a62d313b29
9 changed files with 77 additions and 38 deletions
|
|
@ -6,14 +6,15 @@ import qs
|
|||
import qs.widgets
|
||||
import qs.settings
|
||||
|
||||
WrapperRectangle {
|
||||
Rectangle {
|
||||
id: root
|
||||
color: Colors.base01
|
||||
property PwNode defaultAudio: Pipewire.ready ? Pipewire.preferredDefaultAudioSink : null
|
||||
property bool mute: Pipewire.ready ? defaultAudio?.audio.muted : null
|
||||
radius: Config.rounding
|
||||
leftMargin: 8
|
||||
rightMargin: 8
|
||||
required property double moduleHeight
|
||||
implicitHeight: moduleHeight
|
||||
implicitWidth: pwLayout.implicitWidth + 16
|
||||
function getVolumeIcon() {
|
||||
let volume = Pipewire.ready ? root.defaultAudio.audio.volume : null;
|
||||
if (root.mute) {
|
||||
|
|
@ -32,7 +33,10 @@ WrapperRectangle {
|
|||
PwObjectTracker {
|
||||
objects: [Pipewire.ready ? Pipewire.defaultAudioSink : null]
|
||||
}
|
||||
child: RowLayout {
|
||||
|
||||
RowLayout {
|
||||
id: pwLayout
|
||||
anchors.centerIn: root
|
||||
spacing: 4
|
||||
MaterialIcon {
|
||||
text: root.getVolumeIcon()
|
||||
|
|
|
|||
Loading…
Reference in a new issue