Skip to content

Commit

Permalink
Pass scaleType down to sizeable children
Browse files Browse the repository at this point in the history
Passing scaleType down to Layout sizeable children fixes a bug we were seeing where layout components hugging text objects set to autoWidth would sometimes inadvertently wrap when animation occurs that changes computed text bounds width. This was because once the Layout pushes a size down to Text.controlSize, the effectiveSize returned becomes fixed. This can conflict with the size we measured previously because we measured when the effectiveSize was autoWidth, causing a text wrap flicker until it corrects itself.

Had to change the API so several files were affected, but only Text currently uses the scaleType values.

Before:

https://github.com/user-attachments/assets/34b495ca-edf3-4b27-a7bb-dc69f16517df

After:

https://github.com/user-attachments/assets/c55bc14b-2809-4ce3-81aa-fc59e245a4b7

Diffs=
97050e4fa7 Pass scaleType down to sizeable children (#8524)
  • Loading branch information
philter committed Nov 9, 2024
1 parent 7c4870f commit 4564361
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .rive_head
Original file line number Diff line number Diff line change
@@ -1 +1 @@
071b19ba62ea97db039f71dcab264d4934161db4
97050e4fa782efe750965b5fe20b13afd591abc9

0 comments on commit 4564361

Please sign in to comment.