mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-24 21:42:51 -05:00
switch hto monorepo structure
This commit is contained in:
32
quickshell/PLUGINS/ColorDemoPlugin/ColorDemoSettings.qml
Normal file
32
quickshell/PLUGINS/ColorDemoPlugin/ColorDemoSettings.qml
Normal file
@@ -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
|
||||
}
|
||||
}
|
||||
57
quickshell/PLUGINS/ColorDemoPlugin/ColorDemoWidget.qml
Normal file
57
quickshell/PLUGINS/ColorDemoPlugin/ColorDemoWidget.qml
Normal file
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
12
quickshell/PLUGINS/ColorDemoPlugin/plugin.json
Normal file
12
quickshell/PLUGINS/ColorDemoPlugin/plugin.json
Normal file
@@ -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"]
|
||||
}
|
||||
Reference in New Issue
Block a user