Skip to content

Introduce AnimatableWidget and use Adw.PropertyAnimationTarget - #609

Merged
lenemter merged 2 commits into
mainfrom
lenemter/use-property-animations
Aug 26, 2026
Merged

Introduce AnimatableWidget and use Adw.PropertyAnimationTarget#609
lenemter merged 2 commits into
mainfrom
lenemter/use-property-animations

Conversation

@lenemter

@lenemter lenemter commented Aug 24, 2026

Copy link
Copy Markdown
Member

Fixes memory leak in BaseItem/Launcher by removing BaseItem.cleanup () method altogether. Adw.Animation takes a weak reference, not strong one, so the memory leak reason was the Adw.CallbackAnimationTargets we use.

Instead of using Adw.CallbackAnimationTarget use Adw.PropertyAnimationTarget via custom AnimatableWidget class that implements translation-x/y and scale properties

Closes #605
Closes #607

@lenemter
lenemter requested a review from leolost2605 August 24, 2026 17:29
@lenemter

Copy link
Copy Markdown
Member Author

@leolost2605 I removed cleanup here. Let me know what you think about it and whether it's the direction you want to go

@lenemter
lenemter force-pushed the lenemter/use-property-animations branch from dc4e691 to db9acbc Compare August 24, 2026 17:31

@leolost2605 leolost2605 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is really cool!

Tbh when I suggested this I thought the adw callback target would always pass the widget to the callback so that we could just use static functions but ig I was wrong 😬

Still, I think the way you did it in this PR is actually really clean and I would prefer it over having the cleanup if it's fine with you :)

@danirabbit

Copy link
Copy Markdown
Member

This is way cool to make it so you can just do a property animation!

@lenemter
lenemter merged commit 1f55ec4 into main Aug 26, 2026
4 checks passed
@lenemter
lenemter deleted the lenemter/use-property-animations branch August 26, 2026 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants