Open koendehondt opened 5 months ago
Consider this code:
presenter := SpPresenter new. presenter layout: (SpBoxLayout newLeftToRight add: (presenter newLabel label: 'One'; yourself); add: (presenter newLabel label: 'Two'; yourself); yourself); open
The result is:
That is what I expect.
presenter := SpPresenter new. presenter layout: (SpBoxLayout newLeftToRight add: presenter newList; add: (presenter newLabel label: 'Two'; yourself); yourself); open
That is also what I expect.
Now consider this code:
presenter := SpPresenter new. presenter layout: (SpBoxLayout newLeftToRight add: (presenter newImage image: (presenter iconNamed: #smallError); yourself); add: (presenter newLabel label: 'Label'; yourself); yourself); open
That is not what I expect. Why doesn't the image align to the top of the box layout (i.e. the top of the window), just like a label or a list? That seems to be inconsistent behaviour.
We see the same issue when using a vertical box layout:
presenter := SpPresenter new. presenter layout: (SpBoxLayout newTopToBottom add: (presenter newImage image: (presenter iconNamed: #smallError); yourself); add: (presenter newLabel label: 'Label'; yourself); yourself); open.
While the label is aligned with the left side of the box layout (i.e. the left side of the window), the image is not aligned the same way.
Consider this code:
The result is:
That is what I expect.
Consider this code:
The result is:
That is also what I expect.
Now consider this code:
The result is:
That is not what I expect. Why doesn't the image align to the top of the box layout (i.e. the top of the window), just like a label or a list? That seems to be inconsistent behaviour.
We see the same issue when using a vertical box layout:
While the label is aligned with the left side of the box layout (i.e. the left side of the window), the image is not aligned the same way.