Files
att_menu/modules/AppMenu.qml
T
2026-07-26 21:16:55 +02:00

71 lines
1.8 KiB
QML

import QtQuick
import qs.config
import qs.components
import qs.services
// Left section: the launcher button. The menu itself lives in Launcher.qml as a
// separate layer surface.
Item {
id: root
required property var bar
implicitWidth: button.implicitWidth
PanelButton {
id: button
anchors.verticalCenter: parent.verticalCenter
height: root.height - Theme.spacing
active: launcher.visible
activeColor: Theme.accent
onClicked: Session.toggle("launcher", launcher.screenName)
Row {
spacing: Theme.spacing + 2
// Drawn rather than themed: a 2x2 grid needs no icon theme to be
// installed and always renders.
Item {
implicitWidth: Theme.iconSize
implicitHeight: Theme.iconSize
Grid {
anchors.centerIn: parent
columns: 2
rows: 2
spacing: 3
Repeater {
model: 4
Rectangle {
implicitWidth: 4
implicitHeight: 4
radius: 1
color: button.active ? Theme.background : Theme.text
}
}
}
}
Text {
height: Theme.iconSize
verticalAlignment: Text.AlignVCenter
text: "Apps"
color: button.active ? Theme.background : Theme.text
font.family: Theme.fontFamily
font.pixelSize: Theme.fontSize
font.bold: true
}
}
}
Launcher {
id: launcher
bar: root.bar
}
}