non important commit
This commit is contained in:
parent
cb2c336e17
commit
069a5df2b9
7 changed files with 259 additions and 171 deletions
135
configuration/modules/dots/quick_shell/config/SideBar.qml
Normal file
135
configuration/modules/dots/quick_shell/config/SideBar.qml
Normal file
|
|
@ -0,0 +1,135 @@
|
|||
pragma ComponentBehavior: Bound
|
||||
|
||||
import Quickshell
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
|
||||
PanelWindow {
|
||||
id: sideBar
|
||||
|
||||
required property var clock
|
||||
required property color bgColor
|
||||
required property color recColor
|
||||
required property color fontColor
|
||||
required property int fontSize
|
||||
required property int barWidth
|
||||
required property int recRadius
|
||||
required property int recLength
|
||||
required property int myMargin
|
||||
required property int edgeMargin
|
||||
|
||||
required property bool expanderOpen
|
||||
|
||||
anchors.top: true
|
||||
anchors.left: true
|
||||
anchors.bottom: true
|
||||
|
||||
implicitWidth: sideBar.barWidth
|
||||
color: sideBar.bgColor
|
||||
|
||||
Rectangle {
|
||||
id: logo
|
||||
anchors {
|
||||
horizontalCenter: parent.horizontalCenter
|
||||
top: parent.top
|
||||
topMargin: sideBar.edgeMargin
|
||||
}
|
||||
implicitHeight: sideBar.recLength
|
||||
implicitWidth: sideBar.recLength
|
||||
radius: sideBar.recRadius
|
||||
color: sideBar.recColor
|
||||
|
||||
Image {
|
||||
anchors.centerIn: parent
|
||||
source: "file://" + Quickshell.shellDir + "/assets/logo.svg"
|
||||
sourceSize.width: 30
|
||||
sourceSize.height: 30
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: workspaces
|
||||
anchors {
|
||||
horizontalCenter: parent.horizontalCenter
|
||||
top: logo.bottom
|
||||
topMargin: sideBar.myMargin
|
||||
}
|
||||
implicitHeight: 200
|
||||
implicitWidth: sideBar.recLength
|
||||
radius: sideBar.recRadius
|
||||
color: sideBar.recColor
|
||||
|
||||
Text {
|
||||
anchors.centerIn: parent
|
||||
color: sideBar.fontColor
|
||||
font.pixelSize: sideBar.fontSize
|
||||
text: "ws"
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: notifications
|
||||
anchors {
|
||||
horizontalCenter: parent.horizontalCenter
|
||||
bottom: time.top
|
||||
bottomMargin: sideBar.myMargin
|
||||
}
|
||||
implicitHeight: sideBar.recLength
|
||||
implicitWidth: sideBar.recLength
|
||||
radius: sideBar.recRadius
|
||||
color: sideBar.recColor
|
||||
|
||||
Text {
|
||||
anchors.centerIn: parent
|
||||
color: sideBar.fontColor
|
||||
font.pixelSize: sideBar.fontSize
|
||||
text: "notif"
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: time
|
||||
anchors {
|
||||
horizontalCenter: parent.horizontalCenter
|
||||
bottom: power.top
|
||||
bottomMargin: sideBar.myMargin
|
||||
}
|
||||
implicitHeight: sideBar.recLength
|
||||
implicitWidth: sideBar.recLength
|
||||
radius: sideBar.recRadius
|
||||
color: sideBar.recColor
|
||||
|
||||
Text {
|
||||
anchors.centerIn: parent
|
||||
color: sideBar.fontColor
|
||||
font.pixelSize: sideBar.fontSize
|
||||
text: Qt.formatDateTime(sideBar.clock.date, "hh\nmm")
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: power
|
||||
anchors {
|
||||
horizontalCenter: parent.horizontalCenter
|
||||
bottom: parent.bottom
|
||||
bottomMargin: sideBar.edgeMargin
|
||||
}
|
||||
implicitHeight: sideBar.recLength
|
||||
implicitWidth: sideBar.recLength
|
||||
radius: sideBar.recRadius
|
||||
color: sideBar.recColor
|
||||
|
||||
Button {
|
||||
anchors.fill: parent
|
||||
opacity: 0
|
||||
onClicked: sideBar.expanderOpen = !sideBar.expanderOpen
|
||||
}
|
||||
|
||||
Image {
|
||||
anchors.centerIn: parent
|
||||
source: "file://" + Quickshell.shellDir + "/assets/power.svg"
|
||||
sourceSize.width: 28
|
||||
sourceSize.height: 28
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue