38 lines
959 B
QML
38 lines
959 B
QML
import QtQuick
|
|
import Quickshell
|
|
import Quickshell.Io
|
|
import "../../../config"
|
|
|
|
MouseArea {
|
|
id: menuButton
|
|
width: Math.max(bar.height, menuText.width + Config.spacing)
|
|
height: bar.height
|
|
hoverEnabled: true
|
|
cursorShape: Qt.PointingHandCursor
|
|
|
|
onClicked: {
|
|
menuProc.running = true
|
|
}
|
|
|
|
Rectangle {
|
|
anchors.fill: parent
|
|
color: menuButton.containsMouse ? Colors.secondaryContainer_fg : Qt.alpha(Colors.secondary, 0.75)
|
|
radius: Config.radius
|
|
border.width: 0
|
|
|
|
Text {
|
|
id: menuText
|
|
anchors.centerIn: parent
|
|
text: ""
|
|
font.pixelSize: Config.bigIconSize(menuButton.height)
|
|
font.family: Config.font
|
|
color: menuButton.containsMouse ? Colors.secondaryContainer : Colors.secondary_fg
|
|
}
|
|
}
|
|
|
|
Process {
|
|
id: menuProc
|
|
command: ["sh", "-c", "wofi --show drun"]
|
|
running: false
|
|
}
|
|
} |