mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 15:22:04 +00:00
[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:
parent
de21b273f2
commit
f5fd649dde
1 changed files with 3 additions and 0 deletions
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue