summaryrefslogtreecommitdiff
path: root/raveos-hyprland-theme/theme-data/DankMaterialShell/quickshell/Modules/DankBar/RightSection.qml
diff options
context:
space:
mode:
authorAlexanderCurl <alexc@alexc.hu>2026-04-18 17:46:06 +0100
committerAlexanderCurl <alexc@alexc.hu>2026-04-18 17:46:06 +0100
commit70ca3fef77ee8bdc6e3ac28589a6fa08c024cc69 (patch)
treeab1123d4067c1b086dd6faa7ee4ea643236b565a /raveos-hyprland-theme/theme-data/DankMaterialShell/quickshell/Modules/DankBar/RightSection.qml
parent5d94c0a7d44a2255b81815a52a7056a94a39842d (diff)
downloadRaveOS-PKGBUILD-70ca3fef77ee8bdc6e3ac28589a6fa08c024cc69.tar.gz
RaveOS-PKGBUILD-70ca3fef77ee8bdc6e3ac28589a6fa08c024cc69.zip
Replaced file structures for themes in the correct format
Diffstat (limited to 'raveos-hyprland-theme/theme-data/DankMaterialShell/quickshell/Modules/DankBar/RightSection.qml')
-rw-r--r--raveos-hyprland-theme/theme-data/DankMaterialShell/quickshell/Modules/DankBar/RightSection.qml121
1 files changed, 121 insertions, 0 deletions
diff --git a/raveos-hyprland-theme/theme-data/DankMaterialShell/quickshell/Modules/DankBar/RightSection.qml b/raveos-hyprland-theme/theme-data/DankMaterialShell/quickshell/Modules/DankBar/RightSection.qml
new file mode 100644
index 0000000..58844bc
--- /dev/null
+++ b/raveos-hyprland-theme/theme-data/DankMaterialShell/quickshell/Modules/DankBar/RightSection.qml
@@ -0,0 +1,121 @@
+import QtQuick
+import qs.Common
+
+Item {
+ id: root
+
+ property var widgetsModel: null
+ property var components: null
+ property bool noBackground: false
+ required property var axis
+ property var parentScreen: null
+ property real widgetThickness: 30
+ property real barThickness: 48
+ property real barSpacing: 4
+ property var barConfig: null
+ property var blurBarWindow: null
+ property bool overrideAxisLayout: false
+ property bool forceVerticalLayout: false
+
+ readonly property bool isVertical: overrideAxisLayout ? forceVerticalLayout : (axis?.isVertical ?? false)
+
+ implicitHeight: layoutLoader.item ? layoutLoader.item.implicitHeight : 0
+ implicitWidth: layoutLoader.item ? layoutLoader.item.implicitWidth : 0
+
+ Loader {
+ id: layoutLoader
+ width: parent.width
+ height: parent.height
+ sourceComponent: root.isVertical ? columnComp : rowComp
+ }
+
+ Component {
+ id: rowComp
+ Row {
+ readonly property real widgetSpacing: {
+ const baseSpacing = noBackground ? 2 : Theme.spacingXS;
+ const outlineThickness = (barConfig?.widgetOutlineEnabled ?? false) ? (barConfig?.widgetOutlineThickness ?? 1) : 0;
+ return baseSpacing + (outlineThickness * 2);
+ }
+ spacing: widgetSpacing
+ anchors.right: parent ? parent.right : undefined
+ Repeater {
+ id: rowRepeater
+ model: root.widgetsModel
+ Item {
+ readonly property real rowSpacing: parent.widgetSpacing
+ property var itemData: modelData
+ width: widgetLoader.item ? widgetLoader.item.width : 0
+ height: widgetLoader.item ? widgetLoader.item.height : 0
+ WidgetHost {
+ id: widgetLoader
+ anchors.verticalCenter: parent.verticalCenter
+ widgetId: itemData.widgetId
+ widgetData: itemData
+ spacerSize: itemData.size || 20
+ components: root.components
+ isInColumn: false
+ axis: root.axis
+ section: "right"
+ parentScreen: root.parentScreen
+ widgetThickness: root.widgetThickness
+ barThickness: root.barThickness
+ barSpacing: root.barSpacing
+ barConfig: root.barConfig
+ blurBarWindow: root.blurBarWindow
+ isFirst: index === 0
+ isLast: index === rowRepeater.count - 1
+ sectionSpacing: parent.rowSpacing
+ isLeftBarEdge: false
+ isRightBarEdge: true
+ }
+ }
+ }
+ }
+ }
+
+ Component {
+ id: columnComp
+ Column {
+ width: parent.width
+ readonly property real widgetSpacing: {
+ const baseSpacing = noBackground ? 2 : Theme.spacingXS;
+ const outlineThickness = (barConfig?.widgetOutlineEnabled ?? false) ? (barConfig?.widgetOutlineThickness ?? 1) : 0;
+ return baseSpacing + (outlineThickness * 2);
+ }
+ spacing: widgetSpacing
+ Repeater {
+ id: columnRepeater
+ model: root.widgetsModel
+ Item {
+ width: parent.width
+ readonly property real columnSpacing: parent.widgetSpacing
+ property var itemData: modelData
+ height: widgetLoader.item ? widgetLoader.item.height : 0
+ WidgetHost {
+ id: widgetLoader
+ anchors.horizontalCenter: parent.horizontalCenter
+ widgetId: itemData.widgetId
+ widgetData: itemData
+ spacerSize: itemData.size || 20
+ components: root.components
+ isInColumn: true
+ axis: root.axis
+ section: "right"
+ parentScreen: root.parentScreen
+ widgetThickness: root.widgetThickness
+ barThickness: root.barThickness
+ barSpacing: root.barSpacing
+ barConfig: root.barConfig
+ blurBarWindow: root.blurBarWindow
+ isFirst: index === 0
+ isLast: index === columnRepeater.count - 1
+ sectionSpacing: parent.columnSpacing
+ isTopBarEdge: false
+ isBottomBarEdge: true
+ }
+ }
+ }
+ }
+ }
+}