1
0
Fork 0
forked from wry/wry

feat: add window animations

This commit is contained in:
atagen 2026-05-21 15:20:46 +10:00 committed by kossLAN
parent eece44a59c
commit 2a079ed800
No known key found for this signature in database
29 changed files with 6957 additions and 114 deletions

View file

@ -942,6 +942,125 @@ This table is a tagged union. The variant is determined by the `type` field. It
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-AnimationStyle"></a>
### `AnimationStyle`
Describes a tiled window movement animation style.
Values of this type should be strings.
The string should have one of the following values:
- `plain`:
Uses a single interpolated movement from each window's current visual
rectangle to its destination rectangle.
- `multiphase`:
Uses the no-overlap multiphase planner for tiled window movement when a
supported plan exists.
<a name="types-Animations"></a>
### `Animations`
Describes window animation settings.
- Example:
```toml
[animations]
enabled = true
duration-ms = 160
style = "multiphase"
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.
- `style` (optional):
Sets the animation style used for tiled window movement animations.
The default is `multiphase`.
The value of this field should be a [AnimationStyle](#types-AnimationStyle).
- `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>
### `BarPosition`
@ -2169,6 +2288,24 @@ The table has the following fields:
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
style = "multiphase"
curve = "ease-out"
```
The value of this field should be a [Animations](#types-Animations).
- `xwayland` (optional):
Configures the Xwayland settings.
@ -5670,4 +5807,3 @@ The table has the following fields:
The value of this field should be a [XScalingMode](#types-XScalingMode).