Skip to content

Commit

Permalink
Merge pull request #751 from skydoves/fix/getMeasuredTextWidth
Browse files Browse the repository at this point in the history
Fix measuring text width size to limit with displayWidth
  • Loading branch information
skydoves authored Nov 3, 2024
2 parents a93c4cb + 960a379 commit d871c04
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion balloon/src/main/kotlin/com/skydoves/balloon/Balloon.kt
Original file line number Diff line number Diff line change
Expand Up @@ -1958,7 +1958,7 @@ public class Balloon private constructor(
} else {
0 + builder.marginRight + builder.marginLeft + (builder.arrowSize * 2)
}
val maxTextWidth = builder.maxWidth - spaces
val maxTextWidth = (builder.maxWidth - spaces).coerceAtMost(displayWidth)

return when {
builder.widthRatio != NO_Float_VALUE ->
Expand Down

0 comments on commit d871c04

Please sign in to comment.