Add custom animation curve config
This commit is contained in:
parent
fa5c28ca3d
commit
cf61c080b6
10 changed files with 281 additions and 57 deletions
|
|
@ -1035,6 +1035,10 @@ impl ConfigClient {
|
|||
self.send(&ClientMessage::SetAnimationCurve { curve });
|
||||
}
|
||||
|
||||
pub fn set_animation_cubic_bezier(&self, x1: f32, y1: f32, x2: f32, y2: f32) {
|
||||
self.send(&ClientMessage::SetAnimationCubicBezier { x1, y1, x2, y2 });
|
||||
}
|
||||
|
||||
pub fn set_color_management_enabled(&self, enabled: bool) {
|
||||
self.send(&ClientMessage::SetColorManagementEnabled { enabled });
|
||||
}
|
||||
|
|
|
|||
|
|
@ -554,6 +554,12 @@ pub enum ClientMessage<'a> {
|
|||
SetAnimationCurve {
|
||||
curve: u32,
|
||||
},
|
||||
SetAnimationCubicBezier {
|
||||
x1: f32,
|
||||
y1: f32,
|
||||
x2: f32,
|
||||
y2: f32,
|
||||
},
|
||||
SetXScalingMode {
|
||||
mode: XScalingMode,
|
||||
},
|
||||
|
|
|
|||
|
|
@ -320,6 +320,14 @@ pub fn set_animation_curve(curve: AnimationCurve) {
|
|||
get!().set_animation_curve(curve.0);
|
||||
}
|
||||
|
||||
/// Sets a custom cubic-bezier curve used by tiled window animations.
|
||||
///
|
||||
/// `x1` and `x2` must be between `0.0` and `1.0`. The curve starts at `(0, 0)`
|
||||
/// and ends at `(1, 1)`.
|
||||
pub fn set_animation_cubic_bezier(x1: f32, y1: f32, x2: f32, y2: f32) {
|
||||
get!().set_animation_cubic_bezier(x1, y1, x2, y2);
|
||||
}
|
||||
|
||||
/// Enables or disables the color-management protocol.
|
||||
///
|
||||
/// The default is `false`.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue