开发者

Size of TTStyledText with floating image is being computed wrong

开发者 https://www.devze.com 2023-02-04 23:58 出处:网络
I have a TTStyledText with a floating image. The problem that I am facing is that the height of the text incase there is a floating image larger than text, is being computed wrong. Instead of incorpor

I have a TTStyledText with a floating image. The problem that I am facing is that the height of the text incase there is a floating image larger than text, is being computed wrong. Instead of incorporating the size of the image + text accompanying the image, The implementation just returns size of text. This causes the image开发者_StackOverflow社区 to be clipped.

Any one else has faced this issue?


I finally solved this by defining a TTBoxStyle with minimum size. This way even if the image is clipped the minimum size ensures that some part of the image is displayed properly.

0

精彩评论

暂无评论...
验证码 换一张
取 消