NPill: smoother animation when opening and closing (no instant width jump)

This commit is contained in:
LemmyCook 2025-09-07 18:50:21 -04:00
parent c4846cd977
commit dae1d12b6f

View file

@ -45,7 +45,7 @@ Item {
readonly property int pillOverlap: iconSize * 0.5 readonly property int pillOverlap: iconSize * 0.5
readonly property int maxPillWidth: Math.max(1, textItem.implicitWidth + pillPaddingHorizontal * 2 + pillOverlap) readonly property int maxPillWidth: Math.max(1, textItem.implicitWidth + pillPaddingHorizontal * 2 + pillOverlap)
width: iconSize + (effectiveShown ? maxPillWidth - pillOverlap : 0) width: iconSize + Math.max(0, pill.width - pillOverlap)
height: pillHeight height: pillHeight
Rectangle { Rectangle {