fix modules taking up to much space by using Loader

This commit is contained in:
lucy 2025-12-31 16:40:43 +01:00
parent 0529411f51
commit ff6d6669a9
3 changed files with 9 additions and 7 deletions

View File

@ -37,7 +37,10 @@ PanelWindow {
anchors.right: parent.right anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
Battery {} Battery {}
Volume {} Loader {
sourceComponent: Volume {}
}
PowerProfiles {} PowerProfiles {}
SystemTray { SystemTray {
Layout.rightMargin: 30 Layout.rightMargin: 30

View File

@ -6,12 +6,11 @@ import "../../"
import "../settings/" import "../settings/"
import QtQuick.Layouts import QtQuick.Layouts
Rectangle { Loader {
id: root id: root
visible: UPower.displayDevice.isLaptopBattery visible: UPower.displayDevice.isLaptopBattery
color: "transparent" width: masterLayout.implicitWidth
implicitWidth: masterLayout.implicitWidth + 10 height: 34
implicitHeight: 34
ColumnLayout { ColumnLayout {
id: masterLayout id: masterLayout
anchors.centerIn: parent anchors.centerIn: parent

View File

@ -6,7 +6,7 @@ import Quickshell.Io
import "../../" import "../../"
import "../settings/" import "../settings/"
Item { Loader {
id: root id: root
MouseArea { MouseArea {
anchors.fill: parent anchors.fill: parent
@ -18,7 +18,7 @@ Item {
} }
} }
width: styleLayout.implicitWidth width: styleLayout.implicitWidth
implicitHeight: 34 height: 34
property var sink: Pipewire.defaultAudioSink property var sink: Pipewire.defaultAudioSink
Process { Process {
id: pavu id: pavu