Page 1 of 1
GUI: Composite images shouldn't affect padding
Posted: Fri Sep 16, 2016 11:38 pm
by aubergine18
Currently the corner size of composite images on GUI elements adds to the padding, making it somewhat difficult to properly align things internally.
Ideally the only thing that should affect internal padding of a GUI element is the 4 padding properties.
EDIT: Alternatively, allow negative padding so we can optionally 'undo' padding added by corner size.
Re: GUI: Composite images shouldn't affect padding
Posted: Sat Sep 17, 2016 9:33 am
by ssilk
Ever heard of CSS? Containers in containers in containers?
Re: GUI: Composite images shouldn't affect padding
Posted: Sat Sep 17, 2016 2:45 pm
by aubergine18
Yup, it would be a dream if factorio worked that way. But, for the most part, it doesn't
I can't successfully put other elements in to a button element for example. So if I wanted a button to just be a "clickable container" and then put say a glyph element and a label element in it, at the moment that doesn't work - those other elements appear outside the button and no way I've found to get them inside the button (or have the button act like a frame/flow and do that for me).
And I can't just use a frame for the background graphics, because frames only have single background state; there's no way to update them on hover etc. via style sheet.
I could go to the extreme lengths of having a frame containing a grid containing an unstyled glyph button and label, then use the frame background for border and the grid row color background on hover to mimic a hover state (although it's not graphical so severely limited in terms of design options) but that's so heinous I'd rather climb the Eiffel Tower with nothing but the suction power of my own lips.