usable
This commit is contained in:
@@ -12,6 +12,8 @@ PanelWindow {
|
||||
|
||||
property real radius: 10
|
||||
|
||||
onRadiusChanged: Hyprland.dispatch("exec hyprctl keyword decoration:rounding " + radius)
|
||||
|
||||
anchors {
|
||||
top: true
|
||||
left: true
|
||||
@@ -19,24 +21,20 @@ PanelWindow {
|
||||
bottom: true
|
||||
}
|
||||
|
||||
Dashboard {
|
||||
id: dash
|
||||
|
||||
radius: root.radius
|
||||
}
|
||||
|
||||
|
||||
Component.onCompleted: {
|
||||
|
||||
Hyprland.dispatch("exec hyprctl keyword monitor " + Hyprland.monitorFor(root.screen).name + ",addreserved," + (midFO.visible ? midFO.y + midFO.height : topEx) + "," + botEx + "," + leftEx + "," + rightEx)
|
||||
Hyprland.dispatch("exec hyprctl keyword monitor " + Hyprland.monitorFor(root.screen).name + ",addreserved," + topEx + "," + botEx + "," + leftEx + "," + rightEx)
|
||||
Hyprland.dispatch("exec hyprctl keyword decoration:rounding " + radius)
|
||||
|
||||
}
|
||||
|
||||
property int topEx: topRect.height
|
||||
property int botEx: botRect.height
|
||||
property int topEx: topRect.reserve
|
||||
property int botEx: botRect.reserve
|
||||
|
||||
property int leftEx: leftRect.width
|
||||
property int rightEx: rightRect.width
|
||||
property int leftEx: leftRect.reserve
|
||||
property int rightEx: rightRect.reserve
|
||||
|
||||
|
||||
id: root
|
||||
@@ -50,7 +48,7 @@ PanelWindow {
|
||||
mask: Region {
|
||||
|
||||
Region {
|
||||
item: topRect
|
||||
item: topRect.topRectArea
|
||||
}
|
||||
|
||||
Region {
|
||||
@@ -58,57 +56,32 @@ PanelWindow {
|
||||
}
|
||||
|
||||
Region {
|
||||
item: midFO.visible ? midFO : topRect
|
||||
item: topRect.midFO.visible ? topRect.midFO : leftRect
|
||||
}
|
||||
|
||||
Region {
|
||||
item: dash.visible ? dash : topRect
|
||||
item: dash.visible ? dash : leftRect
|
||||
}
|
||||
}
|
||||
|
||||
WrapperMouseArea {
|
||||
id: topRectArea
|
||||
Rectangle {
|
||||
id: topRect
|
||||
color: Pywal.special.background
|
||||
anchors.fill: parent
|
||||
}
|
||||
implicitHeight: 10
|
||||
implicitWidth: parent.width
|
||||
|
||||
hoverEnabled: true
|
||||
onEntered: {
|
||||
midFO.visible = true
|
||||
}
|
||||
//onEntered: midFO.visible = true
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
BarBottom {
|
||||
id: botRect
|
||||
y: parent.height - height
|
||||
color: Pywal.special.background
|
||||
implicitHeight: 10
|
||||
implicitWidth: parent.width
|
||||
}
|
||||
|
||||
|
||||
BarLeft {
|
||||
id: leftRect
|
||||
window: root
|
||||
}
|
||||
|
||||
|
||||
Rectangle {
|
||||
BarRight {
|
||||
id: rightRect
|
||||
x: parent.width - width
|
||||
color: Pywal.special.background
|
||||
implicitWidth: 10
|
||||
implicitHeight: parent.height
|
||||
}
|
||||
|
||||
Shape {
|
||||
|
||||
x: leftRect.x + leftRect.width - 1
|
||||
y: topRect.y + topRect.height - 1
|
||||
y: topRect.cornerY
|
||||
|
||||
ShapePath {
|
||||
strokeWidth: 4
|
||||
@@ -116,12 +89,6 @@ PanelWindow {
|
||||
fillColor: Pywal.special.background
|
||||
startX: 0; startY: 0
|
||||
|
||||
onFillColorChanged: {
|
||||
console.log(Pywal.special.background)
|
||||
fillColor = Qt.binding(() => Pywal.special.background)
|
||||
strokeColor = Qt.binding(() => Pywal.special.background)
|
||||
}
|
||||
|
||||
PathLine { relativeX: 0; relativeY: radius }
|
||||
PathArc {
|
||||
radiusX: radius
|
||||
@@ -135,7 +102,7 @@ PanelWindow {
|
||||
Shape {
|
||||
|
||||
x: rightRect.x + 1
|
||||
y: topRect.y + topRect.height - 1
|
||||
y: topRect.cornerY
|
||||
|
||||
ShapePath {
|
||||
strokeWidth: 4
|
||||
@@ -199,12 +166,31 @@ PanelWindow {
|
||||
}
|
||||
|
||||
BarTop {
|
||||
id: midFO
|
||||
x: root.screen.width / 2 - width / 2
|
||||
y: topRect.y + topRect.height - 1
|
||||
id: topRect
|
||||
x: leftRect.x + leftRect.width
|
||||
width: rightRect.x - x
|
||||
//y: topRect.y + topRect.height - 1
|
||||
window: root
|
||||
radius: root.radius
|
||||
onVisibleChanged: Hyprland.dispatch("exec hyprctl keyword monitor " + Hyprland.monitorFor(root.screen).name + ",addreserved," + (midFO.visible ? midFO.y + midFO.height : topEx) + "," + botEx + "," + leftEx + "," + rightEx)
|
||||
|
||||
onShowDashChanged: dash.visible = showDash
|
||||
}
|
||||
|
||||
|
||||
onTopExChanged: Hyprland.dispatch("exec hyprctl keyword monitor " + Hyprland.monitorFor(root.screen).name + ",addreserved," + topEx + "," + botEx + "," + leftEx + "," + rightEx)
|
||||
onBotExChanged: Hyprland.dispatch("exec hyprctl keyword monitor " + Hyprland.monitorFor(root.screen).name + ",addreserved," + topEx + "," + botEx + "," + leftEx + "," + rightEx)
|
||||
onRightExChanged: Hyprland.dispatch("exec hyprctl keyword monitor " + Hyprland.monitorFor(root.screen).name + ",addreserved," + topEx + "," + botEx + "," + leftEx + "," + rightEx)
|
||||
onLeftExChanged: Hyprland.dispatch("exec hyprctl keyword monitor " + Hyprland.monitorFor(root.screen).name + ",addreserved," + topEx + "," + botEx + "," + leftEx + "," + rightEx)
|
||||
|
||||
Dashboard {
|
||||
id: dash
|
||||
|
||||
x: root.screen.width / 2 - width / 2
|
||||
y: topRect.reserve - 1
|
||||
|
||||
onVisibleChanged: topRect.showDash = visible
|
||||
//onEntered: topRect.midFO.visible = true
|
||||
onHoveredChanged: topRect.midFO.visible = !hovered
|
||||
|
||||
radius: root.radius
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user