initial commit
This commit is contained in:
@@ -0,0 +1,70 @@
|
||||
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
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user