Skip to content

Commit

Permalink
1.9 docs: Fix structure (#7104)
Browse files Browse the repository at this point in the history
  • Loading branch information
NigelBreslaw authored Dec 16, 2024
1 parent 9bd444c commit f032942
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 11 deletions.
6 changes: 3 additions & 3 deletions docs/astro/astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -221,11 +221,11 @@ export default defineConfig({
slug: "reference/keyboard-input/overview",
},
{
label: "HorizontalLayout",
label: "FocusScope",
slug: "reference/keyboard-input/focusscope",
},
{
label: "VerticalLayout",
label: "TextInput",
slug: "reference/keyboard-input/textinput",
},
],
Expand All @@ -234,7 +234,7 @@ export default defineConfig({
label: "Layouts",
items: [
{
label: "Overview",
label: "Common Properties",
slug: "reference/layouts/overview",
},
{
Expand Down
8 changes: 0 additions & 8 deletions docs/astro/src/content/docs/reference/common.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -95,15 +95,7 @@ It defines coordinates (x,y) relative to the enclosing Window or PopupWindow, bu
(could be screen, window, or popup coordinates).
</SlintProperty>

## Layout

These properties are valid on all visible items and can be used to specify constraints when used in layouts:

- **`col`**, **`row`**, **`colspan`**, **`rowspan`** (_in_ _int_): See <Link type="GridLayout" />.
- **`horizontal-stretch`** and **`vertical-stretch`** (_in-out_ _float_): Specify how much relative space these elements are stretching in a layout. When 0, this means that the elements won't be stretched unless all elements are 0. Builtin widgets have a value of either 0 or 1.
- **`max-width`** and **`max-height`** (_in_ _length_): The maximum size of an element
- **`min-width`** and **`min-height`** (_in_ _length_): The minimum size of an element
- **`preferred-width`** and **`preferred-height`** (_in_ _length_): The preferred size of an element

## Miscellaneous

Expand Down
38 changes: 38 additions & 0 deletions docs/astro/src/content/docs/reference/layouts/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,41 @@
title: Common Properties
description: Layout Common Properties
---

import Link from '/src/components/Link.astro';
import SlintProperty from '/src/components/SlintProperty.astro';


## Properties
These properties are valid on all visible items and can be used to specify constraints when used in layouts:

### col, row
<SlintProperty propName="col, row" typeName="int" default="0">
See <Link type="GridLayout" />.
</SlintProperty>

### colspan, rowspan
<SlintProperty propName="colspan, rowspan" typeName="int">
See <Link type="GridLayout" />.
</SlintProperty>

### horizontal-stretch, vertical-stretch
<SlintProperty propName="horizontal-stretch, vertical-stretch" typeName="float" propertyVisibility="in-out">
Specify how much relative space these elements are stretching in a layout. When 0, this means that the
elements won't be stretched unless all elements are 0. Builtin widgets have a value of either 0 or 1.
</SlintProperty>

### max-width, max-height
<SlintProperty propName="`max-width, `max-height" typeName="length" >
The maximum size of an element.
</SlintProperty>

### min-width, min-height
<SlintProperty propName="`min-width, `min-height" typeName="length" >
The minimum size of an element.
</SlintProperty>

### preferred-width, preferred-height
<SlintProperty propName="`preferred-width, `preferred-height" typeName="length" >
The preferred size of an element.
</SlintProperty>

0 comments on commit f032942

Please sign in to comment.