Compare commits
No commits in common. "41293c02a980168d8f8cba2c4683ad37416f41f7" and "a660da8f252d262fc5e17ad24c644d45f92c8562" have entirely different histories.
41293c02a9
...
a660da8f25
6 changed files with 14 additions and 30 deletions
|
|
@ -68,8 +68,6 @@ Item {
|
||||||
Row {
|
Row {
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
spacing: 6
|
spacing: 6
|
||||||
width: Math.min(implicitWidth, root.width - root.height)
|
|
||||||
clip: implicitWidth > root.width - root.height
|
|
||||||
|
|
||||||
Repeater {
|
Repeater {
|
||||||
model: root.buffer.length
|
model: root.buffer.length
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,15 @@ PanelWindow {
|
||||||
right: true
|
right: true
|
||||||
}
|
}
|
||||||
|
|
||||||
margins.right: S.DockState.reservedWidthAnimated
|
margins.right: S.DockState.reservedWidth
|
||||||
|
|
||||||
|
Behavior on margins.right {
|
||||||
|
enabled: !S.Theme.reducedMotion
|
||||||
|
NumberAnimation {
|
||||||
|
duration: 200
|
||||||
|
easing.type: Easing.OutCubic
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
implicitHeight: S.Theme.barHeight
|
implicitHeight: S.Theme.barHeight
|
||||||
exclusiveZone: implicitHeight
|
exclusiveZone: implicitHeight
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ Item {
|
||||||
if (!scr)
|
if (!scr)
|
||||||
return 0.5;
|
return 0.5;
|
||||||
const gx = mapToGlobal(width / 2, 0).x - scr.x;
|
const gx = mapToGlobal(width / 2, 0).x - scr.x;
|
||||||
const effectiveWidth = scr.width - (S.DockState.reservedWidthAnimated ?? 0);
|
const effectiveWidth = scr.width - (S.DockState.reservedWidth ?? 0);
|
||||||
return Math.max(0, Math.min(1, gx / (effectiveWidth > 0 ? effectiveWidth : scr.width)));
|
return Math.max(0, Math.min(1, gx / (effectiveWidth > 0 ? effectiveWidth : scr.width)));
|
||||||
}
|
}
|
||||||
property color borderColor: Qt.rgba(S.Theme.base0C.r + (S.Theme.base09.r - S.Theme.base0C.r) * _posFrac, S.Theme.base0C.g + (S.Theme.base09.g - S.Theme.base0C.g) * _posFrac, S.Theme.base0C.b + (S.Theme.base09.b - S.Theme.base0C.b) * _posFrac, 1)
|
property color borderColor: Qt.rgba(S.Theme.base0C.r + (S.Theme.base09.r - S.Theme.base0C.r) * _posFrac, S.Theme.base0C.g + (S.Theme.base09.g - S.Theme.base0C.g) * _posFrac, S.Theme.base0C.b + (S.Theme.base09.b - S.Theme.base0C.b) * _posFrac, 1)
|
||||||
|
|
|
||||||
|
|
@ -80,7 +80,7 @@ Item {
|
||||||
corner: 1
|
corner: 1
|
||||||
anchors.top: true
|
anchors.top: true
|
||||||
anchors.right: true
|
anchors.right: true
|
||||||
margins.right: S.DockState.reservedWidthAnimated
|
margins.right: S.DockState.reservedWidth
|
||||||
}
|
}
|
||||||
Corner {
|
Corner {
|
||||||
corner: 2
|
corner: 2
|
||||||
|
|
@ -91,6 +91,6 @@ Item {
|
||||||
corner: 3
|
corner: 3
|
||||||
anchors.bottom: true
|
anchors.bottom: true
|
||||||
anchors.right: true
|
anchors.right: true
|
||||||
margins.right: S.DockState.reservedWidthAnimated
|
margins.right: S.DockState.reservedWidth
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -11,19 +11,6 @@ QtObject {
|
||||||
// Bar, screen corners, etc. read this to adjust layout.
|
// Bar, screen corners, etc. read this to adjust layout.
|
||||||
property int reservedWidth: 0
|
property int reservedWidth: 0
|
||||||
|
|
||||||
// Animated version for smooth visual transitions.
|
|
||||||
// Consumers that need coordinated movement use this instead.
|
|
||||||
property int reservedWidthAnimated: 0
|
|
||||||
|
|
||||||
Behavior on reservedWidthAnimated {
|
|
||||||
NumberAnimation {
|
|
||||||
duration: 200
|
|
||||||
easing.type: Easing.InOutCubic
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
onReservedWidthChanged: reservedWidthAnimated = reservedWidth
|
|
||||||
|
|
||||||
onModeChanged: {
|
onModeChanged: {
|
||||||
if (mode !== "pinned")
|
if (mode !== "pinned")
|
||||||
reservedWidth = 0;
|
reservedWidth = 0;
|
||||||
|
|
|
||||||
|
|
@ -17,15 +17,6 @@ ShellRoot {
|
||||||
id: scope
|
id: scope
|
||||||
required property var modelData
|
required property var modelData
|
||||||
|
|
||||||
readonly property bool _isRightmost: {
|
|
||||||
let maxX = -Infinity;
|
|
||||||
for (let i = 0; i < Quickshell.screens.length; i++) {
|
|
||||||
if (Quickshell.screens[i].x > maxX)
|
|
||||||
maxX = Quickshell.screens[i].x;
|
|
||||||
}
|
|
||||||
return scope.modelData.x >= maxX;
|
|
||||||
}
|
|
||||||
|
|
||||||
Bar {
|
Bar {
|
||||||
screen: scope.modelData
|
screen: scope.modelData
|
||||||
}
|
}
|
||||||
|
|
@ -70,14 +61,14 @@ ShellRoot {
|
||||||
}
|
}
|
||||||
|
|
||||||
LazyLoader {
|
LazyLoader {
|
||||||
active: Modules.dock.enable && scope._isRightmost
|
active: Modules.dock.enable
|
||||||
Dock.AppletDock {
|
Dock.AppletDock {
|
||||||
screen: scope.modelData
|
screen: scope.modelData
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
LazyLoader {
|
LazyLoader {
|
||||||
active: Modules.dock.enable && scope._isRightmost
|
active: Modules.dock.enable
|
||||||
Dock.DockEdgeTrigger {
|
Dock.DockEdgeTrigger {
|
||||||
screen: scope.modelData
|
screen: scope.modelData
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue