diff options
Diffstat (limited to 'raveos-hyprland-theme/theme-data/dms/PLUGINS/ColorDemoPlugin')
3 files changed, 101 insertions, 0 deletions
diff --git a/raveos-hyprland-theme/theme-data/dms/PLUGINS/ColorDemoPlugin/ColorDemoSettings.qml b/raveos-hyprland-theme/theme-data/dms/PLUGINS/ColorDemoPlugin/ColorDemoSettings.qml new file mode 100644 index 0000000..1307fad --- /dev/null +++ b/raveos-hyprland-theme/theme-data/dms/PLUGINS/ColorDemoPlugin/ColorDemoSettings.qml @@ -0,0 +1,32 @@ +import QtQuick +import qs.Common +import qs.Modules.Plugins +import qs.Widgets + +PluginSettings { + id: root + pluginId: "colorDemo" + + StyledText { + width: parent.width + text: "Color Demo Settings" + font.pixelSize: Theme.fontSizeLarge + font.weight: Font.Bold + color: Theme.surfaceText + } + + StyledText { + width: parent.width + text: "Choose a custom color to display in the bar widget" + font.pixelSize: Theme.fontSizeSmall + color: Theme.surfaceVariantText + wrapMode: Text.WordWrap + } + + ColorSetting { + settingKey: "customColor" + label: "Custom Color" + description: "Choose a custom color to display in the widget" + defaultValue: Theme.primary + } +} diff --git a/raveos-hyprland-theme/theme-data/dms/PLUGINS/ColorDemoPlugin/ColorDemoWidget.qml b/raveos-hyprland-theme/theme-data/dms/PLUGINS/ColorDemoPlugin/ColorDemoWidget.qml new file mode 100644 index 0000000..6b90845 --- /dev/null +++ b/raveos-hyprland-theme/theme-data/dms/PLUGINS/ColorDemoPlugin/ColorDemoWidget.qml @@ -0,0 +1,57 @@ +import QtQuick +import qs.Common +import qs.Services +import qs.Widgets +import qs.Modules.Plugins + +PluginComponent { + id: root + + property color customColor: pluginData.customColor || Theme.primary + + horizontalBarPill: Component { + Row { + spacing: Theme.spacingS + + Rectangle { + width: 20 + height: 20 + radius: 4 + color: root.customColor + border.color: Theme.outlineStrong + border.width: 1 + anchors.verticalCenter: parent.verticalCenter + } + + StyledText { + text: root.customColor.toString() + font.pixelSize: Theme.fontSizeSmall + color: Theme.surfaceText + anchors.verticalCenter: parent.verticalCenter + } + } + } + + verticalBarPill: Component { + Column { + spacing: Theme.spacingXS + + Rectangle { + width: 20 + height: 20 + radius: 4 + color: root.customColor + border.color: Theme.outlineStrong + border.width: 1 + anchors.horizontalCenter: parent.horizontalCenter + } + + StyledText { + text: root.customColor.toString() + font.pixelSize: Theme.fontSizeSmall + color: Theme.surfaceText + anchors.horizontalCenter: parent.horizontalCenter + } + } + } +} diff --git a/raveos-hyprland-theme/theme-data/dms/PLUGINS/ColorDemoPlugin/plugin.json b/raveos-hyprland-theme/theme-data/dms/PLUGINS/ColorDemoPlugin/plugin.json new file mode 100644 index 0000000..45bf33a --- /dev/null +++ b/raveos-hyprland-theme/theme-data/dms/PLUGINS/ColorDemoPlugin/plugin.json @@ -0,0 +1,12 @@ +{ + "id": "colorDemo", + "name": "Color Demo", + "description": "Demonstrates color picker plugin setting", + "version": "1.0.0", + "author": "DMS", + "icon": "palette", + "type": "widget", + "component": "./ColorDemoWidget.qml", + "settings": "./ColorDemoSettings.qml", + "permissions": ["settings_read", "settings_write"] +} |