1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-26 06:22:50 -05:00

Abstract away plugin dev a little more

This commit is contained in:
bbedward
2025-10-01 17:47:39 -04:00
parent df9e834309
commit 0ca12d275c
19 changed files with 1447 additions and 230 deletions

View File

@@ -9,6 +9,10 @@ Item {
property var components: null
property bool noBackground: false
required property var axis
property string section: "center"
property var parentScreen: null
property real widgetThickness: 30
property real barThickness: 48
readonly property bool isVertical: axis?.isVertical ?? false
readonly property real spacing: noBackground ? 2 : Theme.spacingXS
@@ -371,7 +375,24 @@ Item {
item.axis = root.axis
}
if (root.axis && "isVertical" in item) {
item.isVertical = root.axis.isVertical
try {
item.isVertical = root.axis.isVertical
} catch (e) {
}
}
// Inject properties for plugin widgets
if ("section" in item) {
item.section = root.section
}
if ("parentScreen" in item) {
item.parentScreen = root.parentScreen
}
if ("widgetThickness" in item) {
item.widgetThickness = root.widgetThickness
}
if ("barThickness" in item) {
item.barThickness = root.barThickness
}
// Inject PluginService for plugin widgets