#3351 closed defect (fixed)
GUI doesn't center text correctly if text has newline
Reported by: | elexis | Owned by: | s0600204 |
---|---|---|---|
Priority: | Should Have | Milestone: | Alpha 23 |
Component: | Core engine | Keywords: | |
Cc: | Patch: | Phab:D1299 |
Description (last modified by )
If you have a text element that contains multiple lines (i.e. you assign a string that has \n in it) and if that text element is set to center the text, then the text will not be aligned correctly.
Reproduce by assigning a string like "123\n123" to a text element and make sure it's centered. If you add another newline to the end of the string (i.e. "123\n123\n") then the string will be aligned correctly.
So it seems that there is a trim / whitespace removal missing somewhere in the C++ GUI part.
Bug was noticed in #3216.
Attachments (2)
Change History (6)
by , 9 years ago
Attachment: | t3351_reproduce.patch added |
---|
by , 7 years ago
Attachment: | rRZ74AM.png added |
---|
comment:1 by , 7 years ago
Description: | modified (diff) |
---|
This bug can also be observed with the FPS counter / ingame time / realtime / ceasefire counter in the top right corner.
comment:2 by , 6 years ago
Description: | modified (diff) |
---|---|
Milestone: | Backlog → Work In Progress |
Patch: | → Phab:D1299 |
comment:4 by , 6 years ago
Milestone: | Work In Progress → Alpha 23 |
---|
Note:
See TracTickets
for help on using tickets.
Easy way to reproduce the error