Skip to content

feat: add width animations for bar modules and workspace buttons#682

Merged
MalpenZibo merged 2 commits intomainfrom
feat/add-animations
May 8, 2026
Merged

feat: add width animations for bar modules and workspace buttons#682
MalpenZibo merged 2 commits intomainfrom
feat/add-animations

Conversation

@MalpenZibo
Copy link
Copy Markdown
Owner

Add two complementary animation approaches:

  • AnimatedSize widget: auto-detects and smoothly animates content width changes.

  • iced_anim::AnimationBuilder: used in workspaces for explicit button width transitions between active/visible/hidden states.

AnimatedSize {
content: content.into(),
duration: Duration::from_millis(400),
easing: Easing::EaseOutCubic,
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not a comment, just a question.
Is this intentionally different from
AnimationBuilder .animation(Easing::EASE.quick())

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The two easing functions are from different crates. I still had to tweak the animation. Probably, this is not subtle enough. The EaseOutCubic should match the feel of EASE

@MalpenZibo MalpenZibo force-pushed the feat/animations-config branch from 3f8780a to 3ebb75f Compare April 26, 2026 09:09
Base automatically changed from feat/animations-config to main April 26, 2026 09:13
Add two complementary animation approaches:

- AnimatedSize widget: auto-detects and smoothly animates content width
  changes. Applied once in build_module_item() so all bar modules get
  smooth width transitions automatically.

- iced_anim::AnimationBuilder: used in workspaces for explicit button
  width transitions between active/visible/hidden states.
@MalpenZibo MalpenZibo force-pushed the feat/add-animations branch from 8cb2b44 to 38ee75b Compare April 26, 2026 15:57
@MalpenZibo MalpenZibo merged commit 192ee10 into main May 8, 2026
5 checks passed
@MalpenZibo MalpenZibo deleted the feat/add-animations branch May 8, 2026 12:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants