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/ControlTile.qml | |
| parent | 3ef8b4973bcae26445f99467d50ad75730d204b5 (diff) | |
feat(quickshell): basic bar, tray, notification
Diffstat (limited to 'modules/system/quickshell/ControlTile.qml')
| -rw-r--r-- | modules/system/quickshell/ControlTile.qml | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/modules/system/quickshell/ControlTile.qml b/modules/system/quickshell/ControlTile.qml new file mode 100644 index 0000000..2c8e0a6 --- /dev/null +++ b/modules/system/quickshell/ControlTile.qml @@ -0,0 +1,50 @@ +import QtQuick +import QtQuick.Layouts +import Quickshell + +Item { + id: root + property string icon: "" + property string label: "" + property bool active: false + property var clickHandler: null + + Layout.fillWidth: true + Layout.preferredHeight: 64 + + Squircle { + anchors.fill: parent + cornerRadius: 16 + fillColor: root.active ? Theme.accent : Theme.surface + + MouseArea { + anchors.fill: parent + hoverEnabled: true + onClicked: { + if (root.clickHandler) root.clickHandler() + } + } + + RowLayout { + anchors.fill: parent + anchors.margins: 12 + spacing: 12 + + IconCircle { + source: root.icon + active: root.active + } + + Text { + text: root.label + color: root.active ? Theme.bg : Theme.text + font.family: Theme.mainFont + font.pixelSize: 11 + font.weight: Font.Medium + elide: Text.ElideRight + Layout.maximumWidth: 80 + visible: root.label !== "" + } + } + } +}
\ No newline at end of file |
