Repository navigation
Style System
Hugo Amnov edited this page Jul 15, 2015
·
3 revisions
The Style of an element determines the parameters to its layout, and to its visual appearance.
- flow : whether or not the widget is part of the 'flow' (automatic layout)
- clipping : whether or not the widget should be clipped
- opacity : whether or not the widget reacts to inputs (mouse or keyboard)
- layout_dim : the dimension along which the children are laid out (X or Y)
- sizing : how is the widget sized, whether it shrinks around its contents, or expands and take as much space as possible
- span : if the widget expands, how much weight relative to the other expanding siblings
- size : manual size of the widget
- padding : the padding between our rectangle and the rectangle in which the children are laid out
- margin : the margin around us, when we are laid out by a parent
- spacing : the spacing between our children in the flow, along both axis
- pivot : the pivot determines layout direction : REVERSE means we sequence the widget from back-to-front, and FORWARD means we sequence them from front-to-back
- background_colour : the colour of the background of the widget
- border_colour : the colour of the border of the widget
- image_colour : the base colour of the image
- text_colour : the colour of the text in the widget
- border_width : the thickness of the border
- corner_radius : the radius of the rounded corners, both for background and border
- padding : the padding around the content of the widget (text or image)
- margin : the margin to add around the widget in the parent flow
- image : the background image
- image_skin : the image to use as a skin with 4 corners, 4 borders and 1 filler (9-sprite system)