Skip to content

Commit

Permalink
More GridSystem documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
alyssonrpg committed Apr 1, 2024
1 parent ae7f742 commit 1aa5221
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 9 deletions.
21 changes: 17 additions & 4 deletions SDK3/Documentation/MkDocs/docs/grid/attributes.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,23 @@ Controls are sorted first by their group (ascending `g-group` number), and then
- **[`g-dyn-width-txt`](attrs/g-dyn-width-txt.md)**: Specifies whether the Grid System should dynamically calculate the width for the control based on its text content.
- **[`g-dyn-height-txt`](attrs/g-dyn-height-txt.md)**: Specifies whether the Grid System should dynamically calculate the height for the control based on its text content.

## Tiling Attributes
## Tiling attributes

- **[`g-vert-tile`](attrs/g-vert-tile.md)**: Specifies whether the Grid System should calculate the control's height to fill the available vertical parent content area.
- **[`g-vert-tile`](attrs/g-vert-tile.md)**: Specifies whether the Grid System should calculate the control's height to fill the available vertical area.

- **[`g-vert-tile-weight`](attrs/g-vert-tile-weight.md)**: Determines the weight of this control when filling the available vertical area.
- **`g-vert-tile-weight`**: A real number that determines the weight this control has when filling the available vertical area. It is used when multiple lines want to fill a content height. Lines with a higher average `g-vert-tile-weight` will "grow more" than lines with a lower average `g-vert-tile-weight`. Default: 1.0

- **[`g-horz-tile`](attrs/g-horz-tile.md)**: Specifies whether the Grid System should calculate the control's width to fill the available horizontal parent content area.
- **`g-horz-tile`**: Specifies whether the Grid System should calculate the control's width to fill the available horizontal area. This attribute functions similarly to `g-vert-tile` but applies to horizontal spaces.


## Size constraint attributes

For width:

- **`g-min-width`**: Specifies the minimum width the control should have, measured in pixels. The grid system will ensure that the control width is not less than this value.
- **`g-max-width`**: Specifies the maximum width the control should have, measured in pixels. The grid system will ensure that the control width is not more than this value.

For height:

- **`g-min-height`**: Specifies the minimum height the control should have, measured in pixels. The grid system will ensure that the control height is not less than this value.
- **`g-max-height`**: Specifies the maximum height the control should have, measured in pixels. The grid system will ensure that the control height is not more than this value.
18 changes: 13 additions & 5 deletions SDK3/Documentation/MkDocs/docs/grid/attrs/g-vert-tile.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
**Type:** Boolean<br/>
**Default:** `false`<br/>
**Allows breakdown by screen size**: Yes<br/>
**Description:** Specifies whether the Grid System should calculate the control's height to fill the available vertical parent content area.
**Description:** Specifies whether the Grid System should calculate the control's height to fill the available vertical area.

When set to `true`, this attribute instructs the Grid System to calculate the control's height to fill the available vertical parent content area. This can be useful for ensuring consistent vertical spacing and alignment in your layout.
When set to `true`, this attribute instructs the Grid System to calculate the control's height to fill the available vertical area. This can be useful for ensuring consistent vertical spacing and alignment in your layout.


Example (without `g-vert-tile`):
Expand All @@ -26,7 +26,7 @@ Example (without `g-vert-tile`):
</form>
```

![Gutter example](../img/vert-tile-1.png)
![Vert Tile Example](../img/vert-tile-1.png)

-----

Expand All @@ -48,6 +48,14 @@ Example (with `g-vert-tile` set to `true` for the buttons):
</form>
```

![Gutter example](../img/vert-tile-2.png)
![Vert Tile Example](../img/vert-tile-2.png)

By setting `g-vert-tile` to `true` for the buttons, they expand vertically to fill the available space, resulting in a layout where the buttons are vertically aligned.
By setting `g-vert-tile` to `true` for the buttons, they expand vertically to fill the available space, resulting in a layout where the buttons are vertically aligned.

!!! note
- A control with `g-vert-tile` set to `true` will fill its line vertically.
- A line where all controls have `g-vert-tile` set to `true` will also fill the parent's content height. So, if the vertical fillment is not occurring as expected, try setting `true` for `g-vert-tile` to all controls in a line.
- When multiple lines want to fill a content height, the grid system will use the controls `g-vert-tile-weight` to calculate the proportion that each line will expand.

!!! warning
- `g-vert-tile` can also shrink the control height to keep consistent vertical spacing. It's a good idea to use `g-min-height` in conjunction to avoid controls becoming too small.
Binary file modified SDK3/Documentation/MkDocs/docs/grid/img/vert-tile-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 1aa5221

Please sign in to comment.