mirror of
https://github.com/niri-wm/niri.git
synced 2026-06-21 02:01:55 +07:00
config: Rearrange animations in struct
This commit is contained in:
+50
-50
@@ -486,14 +486,14 @@ pub struct Animations {
|
||||
#[knuffel(child, default)]
|
||||
pub workspace_switch: WorkspaceSwitchAnim,
|
||||
#[knuffel(child, default)]
|
||||
pub horizontal_view_movement: HorizontalViewMovementAnim,
|
||||
#[knuffel(child, default)]
|
||||
pub window_movement: WindowMovementAnim,
|
||||
#[knuffel(child, default)]
|
||||
pub window_open: WindowOpenAnim,
|
||||
#[knuffel(child, default)]
|
||||
pub window_close: WindowCloseAnim,
|
||||
#[knuffel(child, default)]
|
||||
pub horizontal_view_movement: HorizontalViewMovementAnim,
|
||||
#[knuffel(child, default)]
|
||||
pub window_movement: WindowMovementAnim,
|
||||
#[knuffel(child, default)]
|
||||
pub window_resize: WindowResizeAnim,
|
||||
#[knuffel(child, default)]
|
||||
pub config_notification_open_close: ConfigNotificationOpenCloseAnim,
|
||||
@@ -531,6 +531,36 @@ impl Default for WorkspaceSwitchAnim {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq)]
|
||||
pub struct WindowOpenAnim(pub Animation);
|
||||
|
||||
impl Default for WindowOpenAnim {
|
||||
fn default() -> Self {
|
||||
Self(Animation {
|
||||
off: false,
|
||||
kind: AnimationKind::Easing(EasingParams {
|
||||
duration_ms: 150,
|
||||
curve: AnimationCurve::EaseOutExpo,
|
||||
}),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq)]
|
||||
pub struct WindowCloseAnim(pub Animation);
|
||||
|
||||
impl Default for WindowCloseAnim {
|
||||
fn default() -> Self {
|
||||
Self(Animation {
|
||||
off: false,
|
||||
kind: AnimationKind::Easing(EasingParams {
|
||||
duration_ms: 150,
|
||||
curve: AnimationCurve::EaseOutQuad,
|
||||
}),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq)]
|
||||
pub struct HorizontalViewMovementAnim(pub Animation);
|
||||
|
||||
@@ -563,52 +593,6 @@ impl Default for WindowMovementAnim {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq)]
|
||||
pub struct ConfigNotificationOpenCloseAnim(pub Animation);
|
||||
|
||||
impl Default for ConfigNotificationOpenCloseAnim {
|
||||
fn default() -> Self {
|
||||
Self(Animation {
|
||||
off: false,
|
||||
kind: AnimationKind::Spring(SpringParams {
|
||||
damping_ratio: 0.6,
|
||||
stiffness: 1000,
|
||||
epsilon: 0.001,
|
||||
}),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq)]
|
||||
pub struct WindowOpenAnim(pub Animation);
|
||||
|
||||
impl Default for WindowOpenAnim {
|
||||
fn default() -> Self {
|
||||
Self(Animation {
|
||||
off: false,
|
||||
kind: AnimationKind::Easing(EasingParams {
|
||||
duration_ms: 150,
|
||||
curve: AnimationCurve::EaseOutExpo,
|
||||
}),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq)]
|
||||
pub struct WindowCloseAnim(pub Animation);
|
||||
|
||||
impl Default for WindowCloseAnim {
|
||||
fn default() -> Self {
|
||||
Self(Animation {
|
||||
off: false,
|
||||
kind: AnimationKind::Easing(EasingParams {
|
||||
duration_ms: 150,
|
||||
curve: AnimationCurve::EaseOutQuad,
|
||||
}),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq)]
|
||||
pub struct WindowResizeAnim(pub Animation);
|
||||
|
||||
@@ -625,6 +609,22 @@ impl Default for WindowResizeAnim {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq)]
|
||||
pub struct ConfigNotificationOpenCloseAnim(pub Animation);
|
||||
|
||||
impl Default for ConfigNotificationOpenCloseAnim {
|
||||
fn default() -> Self {
|
||||
Self(Animation {
|
||||
off: false,
|
||||
kind: AnimationKind::Spring(SpringParams {
|
||||
damping_ratio: 0.6,
|
||||
stiffness: 1000,
|
||||
epsilon: 0.001,
|
||||
}),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq)]
|
||||
pub struct Animation {
|
||||
pub off: bool,
|
||||
|
||||
Reference in New Issue
Block a user