MediaMini: handle empty media content with active player for rounded background

This commit is contained in:
Sighthesia
2025-10-19 15:38:20 +08:00
parent 8b5f06aec6
commit ecc97ca255
+4
View File
@@ -120,6 +120,10 @@ Item {
if (!hasActivePlayer) {
return maxWidth
}
// If there's an active player but no contenct, use a minimum height for rounded background
if (hasActivePlayer && fullTitleMetrics.contentWidth === 0) {
return Style.capsuleHeight + Style.marginS
}
// Use content width but don't exceed user-set maximum width
return Math.min(calculateContentWidth(), maxWidth)
}