initial commit for repositioning bar, currently broken
This commit is contained in:
+32
-18
@@ -32,6 +32,7 @@ CustomWindow {
|
||||
return 100;
|
||||
}
|
||||
property real fsTransitionProg: hasFullscreen ? 1 : 0
|
||||
readonly property alias geometry: geometry
|
||||
readonly property bool hasFullscreen: {
|
||||
if (hasSpecialWorkspace) {
|
||||
const specialName = monitor?.lastIpcObject.specialWorkspace?.name;
|
||||
@@ -94,13 +95,21 @@ CustomWindow {
|
||||
panels.popouts.hasCurrent = false;
|
||||
}
|
||||
|
||||
EdgeGeometry {
|
||||
id: geometry
|
||||
|
||||
bar: bar
|
||||
configPosition: Config.bar.position
|
||||
win: root
|
||||
}
|
||||
|
||||
Region {
|
||||
id: emptyRegion
|
||||
|
||||
height: panels.notifications.height
|
||||
width: panels.notifications.width
|
||||
x: panels.notifications.x + root.borderThickness
|
||||
y: panels.notifications.y + bar.implicitHeight
|
||||
x: panels.notifications.x + geometry.insetLeft(root.borderThickness)
|
||||
y: panels.notifications.y + geometry.insetTop(root.borderThickness)
|
||||
|
||||
Region {
|
||||
height: panels.osd.height
|
||||
@@ -113,7 +122,7 @@ CustomWindow {
|
||||
Regions {
|
||||
id: regions
|
||||
|
||||
bar: bar
|
||||
geometry: geometry
|
||||
panels: panels
|
||||
win: root
|
||||
}
|
||||
@@ -192,10 +201,10 @@ CustomWindow {
|
||||
BlobInvertedRect {
|
||||
anchors.fill: parent
|
||||
anchors.margins: -50
|
||||
borderBottom: root.borderThickness - anchors.margins - root.sdfBorderOffset
|
||||
borderLeft: root.borderThickness - anchors.margins - root.sdfBorderOffset
|
||||
borderBottom: geometry.insetBottom(root.borderThickness) - anchors.margins - root.sdfBorderOffset
|
||||
borderLeft: geometry.insetLeft(root.borderThickness) - anchors.margins - root.sdfBorderOffset
|
||||
borderRight: root.borderThickness - anchors.margins - root.sdfBorderOffset
|
||||
borderTop: bar.implicitHeight - anchors.margins - root.sdfBorderOffset
|
||||
borderTop: geometry.insetTop(root.borderThickness) - anchors.margins - root.sdfBorderOffset
|
||||
group: blobGroup
|
||||
radius: root.borderRounding
|
||||
}
|
||||
@@ -211,7 +220,7 @@ CustomWindow {
|
||||
panel: panels.dashboardWrapper
|
||||
radius: Appearance.rounding.normal
|
||||
x: panels.dashboardWrapper.x + panels.dashboard.x + root.borderThickness
|
||||
y: panels.dashboardWrapper.y + panels.dashboard.y + bar.implicitHeight - panels.dashboard.height * extraHeight
|
||||
y: panels.dashboardWrapper.y + panels.dashboard.y + geometry.insetTop(root.borderThickness) - panels.dashboard.height * extraHeight
|
||||
}
|
||||
|
||||
PanelBg {
|
||||
@@ -244,8 +253,7 @@ CustomWindow {
|
||||
implicitWidth: panels.osd.width
|
||||
panel: panels.osdWrapper
|
||||
radius: 20
|
||||
x: panels.osdWrapper.x + panels.osd.x + root.borderThickness
|
||||
y: panels.osdWrapper.y + panels.osd.y + bar.implicitHeight
|
||||
x: panels.osdWrapper.x + panels.osd.x + geometry.insetLeft(root.borderThickness)
|
||||
}
|
||||
|
||||
PanelBg {
|
||||
@@ -267,17 +275,17 @@ CustomWindow {
|
||||
PanelBg {
|
||||
id: popoutBg
|
||||
|
||||
property real extraHeight: 0.2
|
||||
property real extraExtent: 0.2
|
||||
|
||||
deformAmount: panels.popouts.currentName.startsWith("traymenu") ? 0.15 : 0.08
|
||||
implicitHeight: panels.popouts.height * (1 + extraHeight)
|
||||
implicitWidth: panels.popouts.width
|
||||
implicitHeight: panels.popouts.height * (geometry.horizontal ? 1 + extraExtent : 1)
|
||||
implicitWidth: panels.popouts.width * (geometry.horizontal ? 1 : 1 + extraExtent)
|
||||
panel: panels.popoutsWrapper
|
||||
radius: panels.popouts.current?.panelRadius ?? Appearance.rounding.normal
|
||||
x: panels.popoutsWrapper.x + panels.popouts.x + root.borderThickness
|
||||
y: panels.popoutsWrapper.y + panels.popouts.y + bar.implicitHeight - panels.popouts.height * extraHeight
|
||||
x: panels.popoutsWrapper.x + panels.popouts.x + geometry.insetLeft(root.borderThickness) - (geometry.horizontal ? 0 : panels.popouts.width * extraExtent)
|
||||
y: panels.popoutsWrapper.y + panels.popouts.y + geometry.insetTop(root.borderThickness) - (geometry.barOnTop ? panels.popouts.height * extraExtent : 0)
|
||||
|
||||
Behavior on extraHeight {
|
||||
Behavior on extraExtent {
|
||||
Anim {
|
||||
}
|
||||
}
|
||||
@@ -370,6 +378,7 @@ CustomWindow {
|
||||
borderThickness: root.borderLayoutThickness
|
||||
drawing: drawing
|
||||
enabled: true
|
||||
geometry: geometry
|
||||
panels: panels
|
||||
popouts: panels.popouts
|
||||
screen: root.screen
|
||||
@@ -381,6 +390,7 @@ CustomWindow {
|
||||
bar: bar
|
||||
borderThickness: root.borderThickness
|
||||
drawingItem: drawing
|
||||
geometry: geometry
|
||||
screen: root.screen
|
||||
visibilities: visibilities
|
||||
|
||||
@@ -422,14 +432,18 @@ CustomWindow {
|
||||
BarLoader {
|
||||
id: bar
|
||||
|
||||
anchors.bottom: geometry.barOnBottom ? parent.bottom : undefined
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.top: geometry.barOnBottom ? undefined : parent.top
|
||||
enabled: !visibilities.isDrawing
|
||||
fullscreen: root.hasFullscreen
|
||||
height: geometry.horizontal ? implicitHeight : parent.height
|
||||
popouts: panels.popouts
|
||||
popoutsWrapper: panels.popoutsWrapper
|
||||
position: geometry.position
|
||||
screen: root.screen
|
||||
visibilities: visibilities
|
||||
width: geometry.horizontal ? parent.width : implicitWidth
|
||||
}
|
||||
}
|
||||
|
||||
@@ -442,7 +456,7 @@ CustomWindow {
|
||||
implicitHeight: panel.height
|
||||
implicitWidth: panel.width
|
||||
radius: Appearance.rounding.smallest
|
||||
x: panel.x + root.borderThickness
|
||||
y: panel.y + bar.implicitHeight
|
||||
x: panel.x + geometry.insetLeft(root.borderThickness)
|
||||
y: panel.y + geometry.insetTop(root.borderThickness)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user