bar: fix workspaces anims
Also fix hyprland undef error
This commit is contained in:
parent
96c8226def
commit
efd09ae86e
4 changed files with 4 additions and 10 deletions
|
|
@ -17,7 +17,7 @@ Rectangle {
|
|||
property int currentIdx: Hyprland.activeWsId - 1 - groupOffset
|
||||
property real leading: workspaces[currentIdx][vertical ? "y" : "x"]
|
||||
property real trailing: workspaces[currentIdx][vertical ? "y" : "x"]
|
||||
property real currentSize: workspaces[currentIdx][vertical ? "height" : "width"]
|
||||
property real currentSize: workspaces[currentIdx].size
|
||||
property real size: Math.abs(leading - trailing) + currentSize
|
||||
property real offset: Math.min(leading, trailing)
|
||||
|
||||
|
|
|
|||
|
|
@ -88,14 +88,6 @@ Item {
|
|||
Behavior on y {
|
||||
Anim {}
|
||||
}
|
||||
|
||||
Behavior on width {
|
||||
Anim {}
|
||||
}
|
||||
|
||||
Behavior on height {
|
||||
Anim {}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -15,6 +15,8 @@ Item {
|
|||
required property int groupOffset
|
||||
|
||||
readonly property bool isWorkspace: true // Flag for finding workspace children
|
||||
// Unanimated prop for others to use as reference
|
||||
readonly property real size: childrenRect[vertical ? "height" : "width"] + (isOccupied ? Appearance.padding.normal : 0)
|
||||
|
||||
readonly property int ws: groupOffset + index + 1
|
||||
readonly property bool isOccupied: occupied[ws] ?? false
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ Singleton {
|
|||
const len = rClients.length;
|
||||
for (let i = 0; i < len; i++) {
|
||||
const client = rClients[i];
|
||||
if (!clients.find(c => c.address === client.address))
|
||||
if (!clients.find(c => c.address === client?.address))
|
||||
rClients.splice(i, 1);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue