using the old functions to get some rectangles to draw
This commit is contained in:
20
Bar.qml
20
Bar.qml
@@ -26,9 +26,17 @@ Scope {
|
||||
screen: modelData
|
||||
|
||||
mask: Region {
|
||||
Region {
|
||||
item: left
|
||||
}
|
||||
|
||||
Region {
|
||||
item: center
|
||||
}
|
||||
|
||||
Region {
|
||||
item: right
|
||||
}
|
||||
}
|
||||
|
||||
anchors {
|
||||
@@ -46,12 +54,20 @@ Scope {
|
||||
RowLayout {
|
||||
anchors {
|
||||
left: parent.left
|
||||
leftMargin: 3
|
||||
right: parent.right
|
||||
rightMargin: 3
|
||||
top: parent.top
|
||||
}
|
||||
|
||||
Row {
|
||||
id: left
|
||||
|
||||
Layout.alignment: Qt.AlignTop
|
||||
|
||||
WorkspaceSelector {
|
||||
monitor: win.monitor
|
||||
}
|
||||
}
|
||||
|
||||
Item {
|
||||
@@ -61,6 +77,8 @@ Scope {
|
||||
Row {
|
||||
id: center
|
||||
|
||||
Layout.alignment: Qt.AlignTop
|
||||
|
||||
Time {
|
||||
monitor: win.monitor
|
||||
}
|
||||
@@ -72,6 +90,8 @@ Scope {
|
||||
|
||||
Row {
|
||||
id: right
|
||||
|
||||
Layout.alignment: Qt.AlignTop
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
43
Bar/WorkspaceSelector.qml
Normal file
43
Bar/WorkspaceSelector.qml
Normal file
@@ -0,0 +1,43 @@
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import Quickshell
|
||||
import Quickshell.Hyprland
|
||||
|
||||
import "../Color.js" as Colors
|
||||
import "../Components/"
|
||||
import "../Services/"
|
||||
|
||||
Container {
|
||||
id: root
|
||||
|
||||
required property HyprlandMonitor monitor
|
||||
|
||||
boxHeight: 25
|
||||
exclusiveMonitor: monitor
|
||||
|
||||
Row {
|
||||
spacing: 3
|
||||
|
||||
Repeater {
|
||||
delegate: workspaceButton
|
||||
model: WorkspaceManager.getWorkspacesForMonitor(root.exclusiveMonitor)
|
||||
delegateModelAccess: DelegateModel.ReadOnly
|
||||
}
|
||||
|
||||
Component {
|
||||
id: workspaceButton
|
||||
|
||||
Item {
|
||||
required property var modelData
|
||||
|
||||
height: 10
|
||||
width: 10
|
||||
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
color: "red"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user