Document animation TOML settings
This commit is contained in:
parent
501c508839
commit
2115518edf
3 changed files with 238 additions and 1 deletions
|
|
@ -641,6 +641,49 @@
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"AnimationCurve": {
|
||||||
|
"description": "Describes a window animation curve.\n",
|
||||||
|
"anyOf": [
|
||||||
|
{
|
||||||
|
"type": "string",
|
||||||
|
"description": "One of the supported curve presets.\n",
|
||||||
|
"enum": [
|
||||||
|
"linear",
|
||||||
|
"ease",
|
||||||
|
"ease-in",
|
||||||
|
"ease-out",
|
||||||
|
"ease-in-out"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "array",
|
||||||
|
"description": "A custom CSS-style cubic-bezier curve as four numbers:\n`x1`, `y1`, `x2`, and `y2`.\n\nThe implicit endpoints are `(0, 0)` and `(1, 1)`. `x1` and `x2` must\nbe between `0` and `1`.\n",
|
||||||
|
"items": {
|
||||||
|
"type": "number",
|
||||||
|
"description": ""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"Animations": {
|
||||||
|
"description": "Describes window animation settings.\n\n- Example:\n\n ```toml\n [animations]\n enabled = true\n duration-ms = 160\n curve = [0.25, 0.1, 0.25, 1.0]\n ```\n",
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"enabled": {
|
||||||
|
"type": "boolean",
|
||||||
|
"description": "Enables or disables window animations.\n\nThe default is `false`.\n"
|
||||||
|
},
|
||||||
|
"duration-ms": {
|
||||||
|
"type": "integer",
|
||||||
|
"description": "Sets the animation duration in milliseconds.\n\nThe default is `160`.\n"
|
||||||
|
},
|
||||||
|
"curve": {
|
||||||
|
"description": "Sets the animation curve.\n\nThe default is `ease-out`.\n",
|
||||||
|
"$ref": "#/$defs/AnimationCurve"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": []
|
||||||
|
},
|
||||||
"BarPosition": {
|
"BarPosition": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"description": "The position of the bar.",
|
"description": "The position of the bar.",
|
||||||
|
|
@ -1085,6 +1128,10 @@
|
||||||
"description": "Configures the ui-drag settings.\n\n- Example:\n\n ```toml\n ui-drag = { enabled = false, threshold = 20 }\n ```\n",
|
"description": "Configures the ui-drag settings.\n\n- Example:\n\n ```toml\n ui-drag = { enabled = false, threshold = 20 }\n ```\n",
|
||||||
"$ref": "#/$defs/UiDrag"
|
"$ref": "#/$defs/UiDrag"
|
||||||
},
|
},
|
||||||
|
"animations": {
|
||||||
|
"description": "Configures window animations.\n\nAnimations are disabled by default.\n\n- Example:\n\n ```toml\n [animations]\n enabled = true\n duration-ms = 160\n curve = \"ease-out\"\n ```\n",
|
||||||
|
"$ref": "#/$defs/Animations"
|
||||||
|
},
|
||||||
"xwayland": {
|
"xwayland": {
|
||||||
"description": "Configures the Xwayland settings.\n\n- Example:\n\n ```toml\n xwayland = { scaling-mode = \"downscaled\" }\n ```\n",
|
"description": "Configures the Xwayland settings.\n\n- Example:\n\n ```toml\n xwayland = { scaling-mode = \"downscaled\" }\n ```\n",
|
||||||
"$ref": "#/$defs/Xwayland"
|
"$ref": "#/$defs/Xwayland"
|
||||||
|
|
|
||||||
|
|
@ -942,6 +942,96 @@ This table is a tagged union. The variant is determined by the `type` field. It
|
||||||
The numbers should be integers.
|
The numbers should be integers.
|
||||||
|
|
||||||
|
|
||||||
|
<a name="types-AnimationCurve"></a>
|
||||||
|
### `AnimationCurve`
|
||||||
|
|
||||||
|
Describes a window animation curve.
|
||||||
|
|
||||||
|
Values of this type should have one of the following forms:
|
||||||
|
|
||||||
|
#### A string
|
||||||
|
|
||||||
|
One of the supported curve presets.
|
||||||
|
|
||||||
|
The string should have one of the following values:
|
||||||
|
|
||||||
|
- `linear`:
|
||||||
|
|
||||||
|
No easing.
|
||||||
|
|
||||||
|
- `ease`:
|
||||||
|
|
||||||
|
The CSS `ease` curve.
|
||||||
|
|
||||||
|
- `ease-in`:
|
||||||
|
|
||||||
|
The CSS `ease-in` curve.
|
||||||
|
|
||||||
|
- `ease-out`:
|
||||||
|
|
||||||
|
The CSS `ease-out` curve.
|
||||||
|
|
||||||
|
- `ease-in-out`:
|
||||||
|
|
||||||
|
The CSS `ease-in-out` curve.
|
||||||
|
|
||||||
|
|
||||||
|
#### An array
|
||||||
|
|
||||||
|
A custom CSS-style cubic-bezier curve as four numbers:
|
||||||
|
`x1`, `y1`, `x2`, and `y2`.
|
||||||
|
|
||||||
|
The implicit endpoints are `(0, 0)` and `(1, 1)`. `x1` and `x2` must
|
||||||
|
be between `0` and `1`.
|
||||||
|
|
||||||
|
Each element of this array should be a number.
|
||||||
|
|
||||||
|
|
||||||
|
<a name="types-Animations"></a>
|
||||||
|
### `Animations`
|
||||||
|
|
||||||
|
Describes window animation settings.
|
||||||
|
|
||||||
|
- Example:
|
||||||
|
|
||||||
|
```toml
|
||||||
|
[animations]
|
||||||
|
enabled = true
|
||||||
|
duration-ms = 160
|
||||||
|
curve = [0.25, 0.1, 0.25, 1.0]
|
||||||
|
```
|
||||||
|
|
||||||
|
Values of this type should be tables.
|
||||||
|
|
||||||
|
The table has the following fields:
|
||||||
|
|
||||||
|
- `enabled` (optional):
|
||||||
|
|
||||||
|
Enables or disables window animations.
|
||||||
|
|
||||||
|
The default is `false`.
|
||||||
|
|
||||||
|
The value of this field should be a boolean.
|
||||||
|
|
||||||
|
- `duration-ms` (optional):
|
||||||
|
|
||||||
|
Sets the animation duration in milliseconds.
|
||||||
|
|
||||||
|
The default is `160`.
|
||||||
|
|
||||||
|
The value of this field should be a number.
|
||||||
|
|
||||||
|
The numbers should be integers.
|
||||||
|
|
||||||
|
- `curve` (optional):
|
||||||
|
|
||||||
|
Sets the animation curve.
|
||||||
|
|
||||||
|
The default is `ease-out`.
|
||||||
|
|
||||||
|
The value of this field should be a [AnimationCurve](#types-AnimationCurve).
|
||||||
|
|
||||||
|
|
||||||
<a name="types-BarPosition"></a>
|
<a name="types-BarPosition"></a>
|
||||||
### `BarPosition`
|
### `BarPosition`
|
||||||
|
|
||||||
|
|
@ -2169,6 +2259,23 @@ The table has the following fields:
|
||||||
|
|
||||||
The value of this field should be a [UiDrag](#types-UiDrag).
|
The value of this field should be a [UiDrag](#types-UiDrag).
|
||||||
|
|
||||||
|
- `animations` (optional):
|
||||||
|
|
||||||
|
Configures window animations.
|
||||||
|
|
||||||
|
Animations are disabled by default.
|
||||||
|
|
||||||
|
- Example:
|
||||||
|
|
||||||
|
```toml
|
||||||
|
[animations]
|
||||||
|
enabled = true
|
||||||
|
duration-ms = 160
|
||||||
|
curve = "ease-out"
|
||||||
|
```
|
||||||
|
|
||||||
|
The value of this field should be a [Animations](#types-Animations).
|
||||||
|
|
||||||
- `xwayland` (optional):
|
- `xwayland` (optional):
|
||||||
|
|
||||||
Configures the Xwayland settings.
|
Configures the Xwayland settings.
|
||||||
|
|
@ -5670,4 +5777,3 @@ The table has the following fields:
|
||||||
|
|
||||||
The value of this field should be a [XScalingMode](#types-XScalingMode).
|
The value of this field should be a [XScalingMode](#types-XScalingMode).
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2942,6 +2942,22 @@ Config:
|
||||||
```toml
|
```toml
|
||||||
ui-drag = { enabled = false, threshold = 20 }
|
ui-drag = { enabled = false, threshold = 20 }
|
||||||
```
|
```
|
||||||
|
animations:
|
||||||
|
ref: Animations
|
||||||
|
required: false
|
||||||
|
description: |
|
||||||
|
Configures window animations.
|
||||||
|
|
||||||
|
Animations are disabled by default.
|
||||||
|
|
||||||
|
- Example:
|
||||||
|
|
||||||
|
```toml
|
||||||
|
[animations]
|
||||||
|
enabled = true
|
||||||
|
duration-ms = 160
|
||||||
|
curve = "ease-out"
|
||||||
|
```
|
||||||
xwayland:
|
xwayland:
|
||||||
ref: Xwayland
|
ref: Xwayland
|
||||||
required: false
|
required: false
|
||||||
|
|
@ -3655,6 +3671,74 @@ UiDrag:
|
||||||
The default is `10`.
|
The default is `10`.
|
||||||
|
|
||||||
|
|
||||||
|
Animations:
|
||||||
|
kind: table
|
||||||
|
description: |
|
||||||
|
Describes window animation settings.
|
||||||
|
|
||||||
|
- Example:
|
||||||
|
|
||||||
|
```toml
|
||||||
|
[animations]
|
||||||
|
enabled = true
|
||||||
|
duration-ms = 160
|
||||||
|
curve = [0.25, 0.1, 0.25, 1.0]
|
||||||
|
```
|
||||||
|
fields:
|
||||||
|
enabled:
|
||||||
|
kind: boolean
|
||||||
|
required: false
|
||||||
|
description: |
|
||||||
|
Enables or disables window animations.
|
||||||
|
|
||||||
|
The default is `false`.
|
||||||
|
duration-ms:
|
||||||
|
kind: number
|
||||||
|
integer_only: true
|
||||||
|
required: false
|
||||||
|
description: |
|
||||||
|
Sets the animation duration in milliseconds.
|
||||||
|
|
||||||
|
The default is `160`.
|
||||||
|
curve:
|
||||||
|
ref: AnimationCurve
|
||||||
|
required: false
|
||||||
|
description: |
|
||||||
|
Sets the animation curve.
|
||||||
|
|
||||||
|
The default is `ease-out`.
|
||||||
|
|
||||||
|
|
||||||
|
AnimationCurve:
|
||||||
|
kind: variable
|
||||||
|
description: |
|
||||||
|
Describes a window animation curve.
|
||||||
|
variants:
|
||||||
|
- kind: string
|
||||||
|
description: |
|
||||||
|
One of the supported curve presets.
|
||||||
|
values:
|
||||||
|
- value: linear
|
||||||
|
description: No easing.
|
||||||
|
- value: ease
|
||||||
|
description: The CSS `ease` curve.
|
||||||
|
- value: ease-in
|
||||||
|
description: The CSS `ease-in` curve.
|
||||||
|
- value: ease-out
|
||||||
|
description: The CSS `ease-out` curve.
|
||||||
|
- value: ease-in-out
|
||||||
|
description: The CSS `ease-in-out` curve.
|
||||||
|
- kind: array
|
||||||
|
items:
|
||||||
|
kind: number
|
||||||
|
description: |
|
||||||
|
A custom CSS-style cubic-bezier curve as four numbers:
|
||||||
|
`x1`, `y1`, `x2`, and `y2`.
|
||||||
|
|
||||||
|
The implicit endpoints are `(0, 0)` and `(1, 1)`. `x1` and `x2` must
|
||||||
|
be between `0` and `1`.
|
||||||
|
|
||||||
|
|
||||||
Xwayland:
|
Xwayland:
|
||||||
kind: table
|
kind: table
|
||||||
description: |
|
description: |
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue