[1.0.0] Setting .style.single_line = false on label breaks height calculation

Bugs that we were not able to reproduce, and/or are waiting for more detailed info.
Post Reply
User avatar
Therenas
Factorio Staff
Factorio Staff
Posts: 208
Joined: Tue Dec 11, 2018 2:10 pm
Contact:

[1.0.0] Setting .style.single_line = false on label breaks height calculation

Post by Therenas »

When you set single_line to false on a label, the game still considers the height of the label to be that of a single line of text, even if the actual text displayed gets spread over multiple lines. This breaks some situations, like when using vertically_stretchable empty-widgets to vertically center the label. It'll look like this. In appendix is a testmod demonstrating this issue.

(While trying this, I also noticed that the pushers in the example mod don't work at all when added directly to the frame, but that is easily worked around)
Attachments
testmod.zip
(1.07 KiB) Downloaded 20 times

User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 4942
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

Re: [1.0.0] Setting .style.single_line = false on label breaks height calculation

Post by Klonan »

I am afraid the situation is different than you describe:
Image

And I am afraid, that I will move this to pending, as I don't see the behavior as described

User avatar
Therenas
Factorio Staff
Factorio Staff
Posts: 208
Joined: Tue Dec 11, 2018 2:10 pm
Contact:

Re: [1.0.0] Setting .style.single_line = false on label breaks height calculation

Post by Therenas »

The source of the issue might be wrong, but shouldn't the code I provided properly center the text in the frame?

Post Reply

Return to “Pending”