Files
illogical-impulse/dots/.config/quickshell/ii/modules/waffle/bar/BarMenu.qml
T
2025-11-15 17:30:51 +01:00

41 lines
1.0 KiB
QML

import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
import Quickshell
import Quickshell.Hyprland
import qs.modules.common
import qs.modules.common.functions
import qs.modules.waffle.looks
BarPopup {
id: root
default property var menuData
property var model: [
{iconName: "start-here", text: "Start", action: () => {print("hello")}}
]
padding: 2
contentItem: ColumnLayout {
anchors.centerIn: parent
spacing: 0
Repeater {
model: root.model
delegate: WButton {
id: btn
Layout.fillWidth: true
required property var modelData
icon.name: modelData.iconName ? modelData.iconName : ""
monochromeIcon: modelData.monochromeIcon ?? true
text: modelData.text ? modelData.text : ""
onClicked: {
if (modelData.action) modelData.action();
root.close();
}
}
}
}
}