Merge status bar and launcher into morphing top bar
This commit is contained in:
63
Status.qml
Normal file
63
Status.qml
Normal file
@@ -0,0 +1,63 @@
|
||||
import Quickshell
|
||||
import QtQuick
|
||||
import "./Widgets" as Widgets
|
||||
|
||||
Item {
|
||||
width: 800
|
||||
height: 36
|
||||
Row {
|
||||
anchors {
|
||||
top: parent.top
|
||||
left: parent.left
|
||||
bottom: parent.bottom
|
||||
}
|
||||
Item {
|
||||
anchors {
|
||||
top: parent.top
|
||||
bottom: parent.bottom
|
||||
}
|
||||
width: height
|
||||
Rectangle {
|
||||
anchors {
|
||||
fill: parent
|
||||
margins: 4
|
||||
}
|
||||
radius: 12
|
||||
color: parent.hover.hovered ? "#333333" : "#222222"
|
||||
Image {
|
||||
anchors.centerIn: parent
|
||||
width: 20
|
||||
height: width
|
||||
source: Qt.resolvedUrl("./arch.svg")
|
||||
sourceSize {width: width; height: height}
|
||||
}
|
||||
}
|
||||
property var hover: HoverHandler {}
|
||||
property var click: TapHandler {
|
||||
onTapped: launcher.open()
|
||||
}
|
||||
}
|
||||
}
|
||||
Widgets.Workspaces {
|
||||
height: parent.height
|
||||
anchors {
|
||||
top: parent.top
|
||||
bottom: parent.bottom
|
||||
horizontalCenter: parent.horizontalCenter
|
||||
}
|
||||
}
|
||||
Row {
|
||||
anchors {
|
||||
top: parent.top
|
||||
right: parent.right
|
||||
bottom: parent.bottom
|
||||
rightMargin: 12
|
||||
}
|
||||
Text {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
property var clock: SystemClock {}
|
||||
color: "white"
|
||||
text: Qt.formatDateTime(clock.date, "ddd MMM dd · hh:mm")
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user