44 lines
1.1 KiB
QML
44 lines
1.1 KiB
QML
|
|
import QtQuick
|
||
|
|
import Quickshell
|
||
|
|
import qs.Common
|
||
|
|
import qs.Modules.Plugins
|
||
|
|
|
||
|
|
DesktopPluginComponent {
|
||
|
|
id: root
|
||
|
|
|
||
|
|
minWidth: 160
|
||
|
|
minHeight: 100
|
||
|
|
defaultWidth: 200
|
||
|
|
defaultHeight: 120
|
||
|
|
|
||
|
|
// Settings are available via pluginData (reactive)
|
||
|
|
property string label: pluginData.label || "Desktop Widget"
|
||
|
|
property real bgOpacity: (pluginData.bgOpacity ?? 70) / 100
|
||
|
|
|
||
|
|
Rectangle {
|
||
|
|
anchors.fill: parent
|
||
|
|
radius: Theme.cornerRadius
|
||
|
|
color: Theme.withAlpha(Theme.surfaceContainer, root.bgOpacity)
|
||
|
|
border.color: Theme.outline
|
||
|
|
border.width: 1
|
||
|
|
|
||
|
|
Column {
|
||
|
|
anchors.centerIn: parent
|
||
|
|
spacing: Theme.spacingS
|
||
|
|
|
||
|
|
StyledText {
|
||
|
|
text: root.label
|
||
|
|
font.pixelSize: Theme.fontSizeLarge
|
||
|
|
font.weight: Font.Medium
|
||
|
|
color: Theme.surfaceText
|
||
|
|
}
|
||
|
|
|
||
|
|
StyledText {
|
||
|
|
text: "Drag to move • Resize from corner"
|
||
|
|
font.pixelSize: Theme.fontSizeSmall
|
||
|
|
color: Theme.surfaceVariantText
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|