diff options
| author | Leander Scherer <leander@schererleander.de> | 2026-05-18 21:48:24 +0200 |
|---|---|---|
| committer | Leander Scherer <leander@schererleander.de> | 2026-05-28 22:42:07 +0200 |
| commit | 9a7cf1242d296dbdb9c03df48ab09054960295aa (patch) | |
| tree | f1a2d5c77ef6bdb049c995afcc4c663c1ffd1373 /modules/system/quickshell/CustomCheckBox.qml | |
| parent | 3ef8b4973bcae26445f99467d50ad75730d204b5 (diff) | |
feat(quickshell): basic bar, tray, notification
Diffstat (limited to 'modules/system/quickshell/CustomCheckBox.qml')
| -rw-r--r-- | modules/system/quickshell/CustomCheckBox.qml | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/modules/system/quickshell/CustomCheckBox.qml b/modules/system/quickshell/CustomCheckBox.qml new file mode 100644 index 0000000..9b7014d --- /dev/null +++ b/modules/system/quickshell/CustomCheckBox.qml @@ -0,0 +1,44 @@ +import QtQuick +import QtQuick.Controls + +CheckBox { + id: control + + contentItem: Text { + text: control.text + color: Theme.text + font.family: Theme.mainFont + font.pixelSize: 13 + verticalAlignment: Text.AlignVCenter + leftPadding: control.indicator.width + control.spacing + } + + indicator: Rectangle { + implicitWidth: 14 + implicitHeight: 14 + x: control.leftPadding + y: Math.round((control.height - height) / 2) + radius: 3.5 + color: control.checked ? Theme.accent : Theme.surface + border.color: control.checked ? Theme.accent : Theme.border + border.width: 1 + + Canvas { + anchors.fill: parent + visible: control.checked + onPaint: { + var ctx = getContext("2d"); + ctx.reset(); + ctx.lineWidth = 1.5; + ctx.strokeStyle = "white"; + ctx.lineCap = "round"; + ctx.lineJoin = "round"; + ctx.beginPath(); + ctx.moveTo(3, 7); + ctx.lineTo(6, 10); + ctx.lineTo(11, 4); + ctx.stroke(); + } + } + } +} |
