You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix incorrect bounding text for Text(Input) when element is bigger than intrinsic text size
The Text element may be given a size that exceeds its intrinsic size, however we returned the intrinsic size. The broke partial rendering when for example text was aligned within the bigger geometry:
Text {
text: "Ok";
horizontal-alignment: right;
x: 0px;
y: 0px;
width: 100px;
height: 50px;
}
This would return a bounding rect with an origin of (0, 0) and a width of maybe 20px, while the text is being rendered centered in the 100px wide geometry. That in turn meant that if that area with the text was marked as dirty, due to some overlap or for example linuxkms mouse cursor, then the Text element wasn't re-rendered because the bounding rect doesn't intersect with the clip.
One option would be to teach the renderers text_size() about alignment, but it turns out that this is the only place where this is needed. So instead, fix this by using bounding_rect() to cover only the case it was originally introduced for - text exceeding the geometry - and otherwise return the geometry.
0 commit comments