diff --git a/modules/bar/Bar.qml b/modules/bar/Bar.qml index 9dcaf7f..aabe30c 100644 --- a/modules/bar/Bar.qml +++ b/modules/bar/Bar.qml @@ -36,12 +36,16 @@ PanelWindow { spacing: 40 anchors.right: parent.right anchors.verticalCenter: parent.verticalCenter - Battery {} + Loader { + sourceComponent: Battery {} + } Loader { sourceComponent: Volume {} } - PowerProfiles {} + Loader { + sourceComponent: PowerProfiles {} + } SystemTray { Layout.rightMargin: 30 } diff --git a/modules/bar/Battery.qml b/modules/bar/Battery.qml index cd432f1..341cfb6 100644 --- a/modules/bar/Battery.qml +++ b/modules/bar/Battery.qml @@ -5,10 +5,9 @@ import "../../" import "../settings/" import QtQuick.Layouts -Loader { +Item { id: root - active: UPower.displayDevice.isLaptopBattery - width: 50 + implicitWidth: masterLayout.implicitWidth height: 34 property bool isCharging: UPower.displayDevice.state === UPowerDeviceState.Charging function getBatteryIcon() { diff --git a/modules/bar/Volume.qml b/modules/bar/Volume.qml index 7973be8..2632dd0 100644 --- a/modules/bar/Volume.qml +++ b/modules/bar/Volume.qml @@ -6,8 +6,11 @@ import Quickshell.Io import "../../" import "../settings/" -Loader { +Item { id: root + implicitWidth: styleLayout.implicitWidth + height: 34 + property var sink: Pipewire.defaultAudioSink MouseArea { anchors.fill: parent cursorShape: Qt.PointingHandCursor @@ -17,9 +20,6 @@ Loader { } } } - width: 50 - height: 34 - property var sink: Pipewire.defaultAudioSink Process { id: pavu command: ["pavucontrol"] // The command and args list