[1.1.49] Multi-line labels cause strange behavior with scroll panes and stretching

Post your bugs and problems so we can fix them.
Post Reply
User avatar
Raiguard
Filter Inserter
Filter Inserter
Posts: 357
Joined: Wed Dec 13, 2017 8:29 pm
Contact:

[1.1.49] Multi-line labels cause strange behavior with scroll panes and stretching

Post by Raiguard »



To reproduce

1. Download Task List (requires the Factorio library)
2. Create a task with a very long description (lorem ipsum works nicely)
3. Observe the above effects

I attempted to reproduce this with a simple test mod, but failed. Something in the combination of elements and layouts in Task List is causing this, but I haven't been able to figure out exactly what. Here is the layout of a task item in the mod's code.

Bug 1: Scroll pane height

As you can see, the added height of the multi-line label is not communicated to the scroll pane at all, so rather than stretching until it hits max height (which in this case is 900), it immediately initiates scrolling. The expected behavior is that it would stretch like it normally does until it his max height, and only then would it start scrolling.

Bug 2: horizontally_stretchable

The content of the scroll pane uses horizontally_stretchable with a twelve-pixel padding on the scroll pane's content flow. However, when the label wraps, the stretching is reduced to the width of the label itself. You can see this in the above video by comparing looking at the distance between the expand button and the scroll bar - it is much more than twelve pixels. It also happens to line up perfectly with the width of the description label.

Then, if you scroll down, the subtasks are going all the way right, and the padding is gone for them. You cannot click the expand buttons because they're outside of the scroll pane's content flow.

The expected behavior is that it would stretch until it hits the twelve-pixel padding on the scroll pane.
Attachments
scroll pane height.mp4
(59.9 KiB) Downloaded 104 times
Don't forget, you're here forever.

Post Reply

Return to “Bug Reports”