use the correct axis when calculating pill size. this fixes a bug in vertical bar mode where the hover expansion animation was too fast.

This commit is contained in:
tuibird
2026-02-10 16:25:20 +13:00
parent 01aa58afde
commit 7c200450c6
+4 -8
View File
@@ -64,18 +64,14 @@ Item {
readonly property real iconSize: Style.toOdd(pillHeight * 0.48)
// Content height calculation (for implicit sizing and visual layout)
// Content height calculation (for implicit sizing)
readonly property real contentHeight: {
if (collapseToIcon) {
return hasIcon ? buttonSize : 0;
}
if (revealed) {
var overlap = hasIcon ? pillOverlap : 0;
var baseHeight = hasIcon ? buttonSize : 0;
return baseHeight + Math.max(0, maxPillHeight - overlap);
}
// Fallback to buttonSize in idle state to remain clickable
return buttonSize;
var overlap = hasIcon ? pillOverlap : 0;
var baseHeight = hasIcon ? buttonSize : 0;
return baseHeight + Math.max(0, pill.height - overlap);
}
// Fill parent width to extend horizontal click area