l4l / yofi

yofi is a minimalistic menu for wayland
https://crates.io/crates/yofi
MIT License
337 stars 22 forks source link

Adaptive height with animation #143

Closed filtsin closed 7 months ago

filtsin commented 1 year ago

Add animation.rs with some math for animations and new features:

Params

Global:

List items section

New animation section (if it is present, then animations are enabled)

filtsin commented 1 year ago

Thank you for review. I committed my changes and updated pr description.

l4l commented 1 year ago

Screenshot_2023 03 16_21:45:35

Something wrong with the end of border calculation here I guess? (it's half of the size, so yes animation is enabled)

Also when I was taking a screenshot for some reason it plays animation from the original size.

filtsin commented 1 year ago

Sorry, I can't understand what is the problem. Did you turn on the animation and nothing happened? What's your duration value?

[animation]
height_duration_ms = ?

There is one more param for height change: auto_height in global section. Did you set it? (Maybe remove this because we have height_duration_ms?)

l4l commented 1 year ago

Sorry, I can't understand what is the problem. Did you turn on the animation and nothing happened?

Yeah, the screenshot was a really dumb way to explain the issue, sorry. I did enable animation and it mostly works. auto_height is also enabled. It should be independent of height_duration_ms value. See the demo:

demo.webm

filtsin commented 1 year ago

Thank you. I reproduced it myself with hide_actions = false. I'll try to fix it

filtsin commented 1 year ago

Can you check again with new changes?

filtsin commented 7 months ago

Sorry no time for this pr and no interest. If someone want to continue work on animations welcome to take my code :). I'm using my branch for adaptive height but without animation (turns out it looks good)