dock: pin button, launcher button

This commit is contained in:
end-4
2025-05-28 11:35:19 +02:00
parent 442ddc1a7b
commit a5abe19854
7 changed files with 246 additions and 6 deletions
@@ -27,9 +27,10 @@ Button {
property var parentGroup: root.parent
property int clickIndex: parentGroup?.clickIndex ?? -1
Layout.fillWidth: (clickIndex - 1 <= parentGroup.children.indexOf(button) && parentGroup.children.indexOf(button) <= clickIndex + 1)
implicitWidth: (button.down && bounce) ? clickedWidth : baseWidth
implicitHeight: (button.down && bounce) ? clickedHeight : baseHeight
Layout.fillWidth: (clickIndex - 1 <= parentGroup.children.indexOf(root) && parentGroup.children.indexOf(root) <= clickIndex + 1)
Layout.fillHeight: (clickIndex - 1 <= parentGroup.children.indexOf(root) && parentGroup.children.indexOf(root) <= clickIndex + 1)
implicitWidth: (root.down && bounce) ? clickedWidth : baseWidth
implicitHeight: (root.down && bounce) ? clickedHeight : baseHeight
Behavior on implicitWidth {
animation: Appearance.animation.clickBounce.numberAnimation.createObject(this)
@@ -56,9 +57,9 @@ Button {
colBackground)) : colBackground
onDownChanged: {
if (button.down) {
if (button.parent.clickIndex !== undefined) {
button.parent.clickIndex = parent.children.indexOf(button)
if (root.down) {
if (root.parent.clickIndex !== undefined) {
root.parent.clickIndex = parent.children.indexOf(root)
}
}
}