32 lines
715 B
QML
32 lines
715 B
QML
pragma ComponentBehavior: Bound
|
|
import QtQuick
|
|
import QtQuick.Layouts
|
|
import Quickshell.Widgets
|
|
import qs.Common
|
|
|
|
WrapperRectangle {
|
|
id: barArea
|
|
|
|
property var monitor: "DP-1"
|
|
property var components: [] // Add this new property
|
|
|
|
color: "transparent"
|
|
rightMargin: Theme.gaps
|
|
leftMargin: Theme.gaps
|
|
|
|
RowLayout {
|
|
Repeater {
|
|
model: barArea.components
|
|
|
|
delegate: Loader {
|
|
required property var modelData
|
|
// The source of the loader is the component from the model
|
|
source: modelData
|
|
onLoaded: {
|
|
item.monitor = barArea.monitor;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|