Add CSS and Python syntax for individual axis alignment.

This commit is contained in:
Rodrigo Girão Serrão
2022-12-15 18:09:13 +00:00
parent e5ef92d443
commit 03a2e3080a

View File

@@ -81,8 +81,13 @@ Each label has been aligned differently inside its container, and its text shows
```sass ```sass
/* Align child widgets to the center. */ /* Align child widgets to the center. */
align: center middle; align: center middle;
/* Align child widget to th top right */ /* Align child widget to the top right */
align: right top; align: right top;
/* Change the horizontal alignment of the children of a widget */
align-horizontal: right;
/* Change the vertical alignment of the children of a widget */
align-vertical: middle;
``` ```
## Python ## Python
@@ -91,4 +96,9 @@ align: right top;
widget.styles.align = ("center", "middle") widget.styles.align = ("center", "middle")
# Align child widgets to the top right # Align child widgets to the top right
widget.styles.align = ("right", "top") widget.styles.align = ("right", "top")
# Change the horizontal alignment of the children of a widget
widget.styles.align_horizontal = "right"
# Change the vertical alignment of the children of a widget
widget.styles.align_vertical = "middle"
``` ```