bar: workspaces some fixes
And anim occupied pill movement
This commit is contained in:
parent
db65e7ca3e
commit
5c3f27f332
3 changed files with 12 additions and 7 deletions
|
|
@ -29,7 +29,7 @@ Item {
|
|||
count++;
|
||||
}
|
||||
if (!occupied[ws + 1])
|
||||
pills[pills.length - 1].end = ws;
|
||||
pills[count - 1].end = ws;
|
||||
}
|
||||
}
|
||||
if (pills.length > count)
|
||||
|
|
@ -42,7 +42,7 @@ Item {
|
|||
|
||||
Repeater {
|
||||
model: ScriptModel {
|
||||
values: root.pills
|
||||
values: root.pills.filter(p => p)
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
|
|
@ -81,6 +81,14 @@ Item {
|
|||
}
|
||||
}
|
||||
|
||||
Behavior on x {
|
||||
Anim {}
|
||||
}
|
||||
|
||||
Behavior on y {
|
||||
Anim {}
|
||||
}
|
||||
|
||||
Behavior on width {
|
||||
Anim {}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ import QtQuick.Layouts
|
|||
StyledText {
|
||||
required property int index
|
||||
required property bool vertical
|
||||
required property bool homogenous
|
||||
required property var occupied
|
||||
required property int groupOffset
|
||||
|
||||
|
|
@ -19,6 +18,6 @@ StyledText {
|
|||
color: BarConfig.workspaces.occupiedBg || occupied[ws] ? Appearance.colours.text : Appearance.colours.subtext0
|
||||
horizontalAlignment: StyledText.AlignHCenter
|
||||
|
||||
Layout.preferredWidth: homogenous && !vertical ? BarConfig.sizes.innerHeight : -1
|
||||
Layout.preferredHeight: homogenous && vertical ? BarConfig.sizes.innerHeight : -1
|
||||
Layout.minimumWidth: vertical ? -1 : BarConfig.sizes.innerHeight
|
||||
Layout.minimumHeight: vertical ? BarConfig.sizes.innerHeight : -1
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,7 +22,6 @@ Item {
|
|||
BoxLayout {
|
||||
id: layout
|
||||
|
||||
homogenous: true
|
||||
spacing: 0
|
||||
|
||||
Repeater {
|
||||
|
|
@ -30,7 +29,6 @@ Item {
|
|||
|
||||
Workspace {
|
||||
vertical: root.vertical
|
||||
homogenous: layout.homogenous
|
||||
occupied: root.occupied
|
||||
groupOffset: root.groupOffset
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue