test blob bounciness

This commit is contained in:
2026-04-19 22:21:49 +02:00
parent 32c8b7311d
commit 007cb32690
8 changed files with 28 additions and 32 deletions
+5 -1
View File
@@ -17,12 +17,16 @@ Item {
implicitWidth: content.implicitWidth
visible: width > 0 && height > 0
x: {
const off = content.currentCenter - content.nonAnimWidth / 2;
if (content.isDetached)
return (parent.width - content.nonAnimWidth) / 2;
const off = content.currentCenter - Config.barConfig.border - content.nonAnimWidth / 2;
const diff = parent.width - Math.floor(off + content.nonAnimWidth);
if (diff < 0)
return off + diff;
return Math.floor(Math.max(off, 0));
}
y: content.isDetached ? (parent.height - content.nonAnimHeight) / 2 : 0
Behavior on offsetScale {
Anim {
+1 -1
View File
@@ -25,7 +25,7 @@ CustomClippingRect {
anchors.centerIn: parent
height: 200
visible: script.values.length === 0
width: 300
width: 600
MaterialIcon {
id: noUpdatesIcon
+1 -2
View File
@@ -15,6 +15,7 @@ Item {
property real currentCenter
property alias currentName: popoutState.currentName
property string detachedMode
readonly property bool isDetached: detachedMode.length > 0
property alias hasCurrent: popoutState.hasCurrent
readonly property real nonAnimHeight: children.find(c => c.shouldBeActive)?.implicitHeight ?? content.implicitHeight
readonly property real nonAnimWidth: children.find(c => c.shouldBeActive)?.implicitWidth ?? content.implicitWidth
@@ -50,8 +51,6 @@ Item {
implicitWidth: nonAnimWidth
Behavior on implicitHeight {
enabled: root.offsetScale < 1
Anim {
duration: root.animLength
easing.bezierCurve: root.animCurve