[ui] Mark the text view as free-floating

This prevent the layout system from repositioning the text view and thus
breaking text-shaping. Now Tengwar Telcontar looks much more balanced in
the widgets.
This commit is contained in:
Bill Currie 2023-07-13 14:00:39 +09:00
parent de21b273f2
commit f5fd649dde

View file

@ -840,6 +840,9 @@ add_text (imui_ctx_t *ctx, view_t view, imui_state_t *state, int mode)
auto pos = View_GetPos (text);
View_SetPos (text, pos.x, pos.y - len.y + ascender);
View_SetGravity (text, grav_northwest);
// prevent the layout system from repositioning the text view
View_Control (text)->free_x = 1;
View_Control (text)->free_y = 1;
View_SetVisible (text, 1);
Ent_SetComponent (text.id, c_glyphs, reg,