psifidotos / nowdock-plasmoid

Plasma 5 plasmoid that creates a plank or mac style effect for tasks
GNU General Public License v3.0
37 stars 3 forks source link

Possibility to customize animation duration #32

Closed alexjp closed 7 years ago

alexjp commented 7 years ago

Hi,

Would it be possible to configure nowdock's animation duration in the configuration options ?

The animation of nowdock seems much slower than kde/plasma/kwin configuration of animations, would love to speed it up a little.

Would it be possible to pick up the configuration option from kwin in system settings about animation speed ?

Thanks

psifidotos commented 7 years ago

now dock has its own independent animation speeds... plasma provides access to its used durations...

I suppose this could be a very good junior job...

alexjp commented 7 years ago

I suppose this could be a very good junior job...

If you can mentor me a little, i would love to take a crack at it :)

psifidotos commented 7 years ago

Of course! Στις 9 Σεπ 2016 9:53 π.μ., ο χρήστης "Alexandre Pereira" < notifications@github.com> έγραψε:

I suppose this could be a very good junior job...

If you can mentor me a little, i would love to take a crack at it :)

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/psifidotos/nowdock-plasmoid/issues/32#issuecomment-245834394, or mute the thread https://github.com/notifications/unsubscribe-auth/ACHSGkVhCymnwXSUkNhkAef8EwiQUtRHks5qoQJSgaJpZM4J4KWU .

psifidotos commented 7 years ago

according to, https://api.kde.org/frameworks/plasma-framework/html/classUnits.html

we can use in qml code directly: units.shortDuration units.longDuration

animations have been configured with: Behavior on ..... { duration: ..... }

and with SequentialAnimation and ParallelAnimation elements

you could try to observe in the plasmoid codepage the files: main.qml TaskDelegate.qml (this is the task container) TaskIconItem.qml (this is the task icon and triggers most of the animations)

send small patches and try to test your changes... For example a code for the above elements like:

.... duration: 200 ... (this means 200ms)

could be changed into

... duration: 2*units.shortDuration ... (this means execute for two times the short duration of plasma)

alexjp commented 7 years ago

Is there a way for us to talk directly, instead of being here on github issues ? I promise I won't stalk you :)

psifidotos commented 7 years ago

We could organize a chat session actually in irc...

If you are interested we could find a time to discuss this...

On 09/09/2016 11:07 πμ, Alexandre Pereira wrote:

Is there a way for us to talk directly, instead of being here on github issues ? I promise I won't stalk you :)

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/psifidotos/nowdock-plasmoid/issues/32#issuecomment-245847690, or mute the thread https://github.com/notifications/unsubscribe-auth/ACHSGmYIMhKc0l7o_B9hDwLi1LwqFI9jks5qoROvgaJpZM4J4KWU.

alexjp commented 7 years ago

Can you checkout: https://github.com/alexjp/nowdock-plasmoid , duration branch ?

It is almost working to my liking, except that icon shadows seem "too slow to appear" at anything that is customized under duration slider value 2.

Sorry if things are badly done.

alexjp commented 7 years ago

I added a config slider to make a generic speed between 0 <-> 5. 0 should remove all animations. 5 Makes things super slow. Default value 2 should be more or less the same time.

I tried to mimic the current animation speed. Myself, I would like to use between a duration Time of 1 or 1.5. But shadows seem to be too slow in that speed, at least in my system.

psifidotos commented 7 years ago

@alexjp , nice!! I will look into it the next days!!!

for shadows you can just leave the old settings... shadows and their created buffers will be reconsider in future iterations... I am not so happy with them and their buffering mechanism....

alexjp commented 7 years ago

update: rebased with your lastest code ( these last 3 commits from svgs ) and fixed the shadow drawing and appearing in time in faster animations.

will now use it extensively and try to find problems

psifidotos commented 7 years ago

Alex, I look at your code... it looks nice.... Some notes... when we use units.longDuration this duration is effected by the animation speed which is set for the kwin effects... So the question is:

Question1: Do we need in Now Dock a different slider to set animations, or we can use just the plasma setting ?

Question2: You can use for your durationTime a Real value which can give you 1.5 that you needed in some cases...

Notice1: There are some cases that the duration shouldnt be changed because it affects the befavior of the plasmoid and not the visual speed... Dont worry about them when I will merge I will take care of them... When you think you are ready make a pull request and I am going to tweak any small changes needed... :)

psifidotos commented 7 years ago

@alexjp , concerning the pull request (svgs branch with duration branch) I can do it if you want... Just tell me when you think it is ready...

alexjp commented 7 years ago

@alexjp , concerning the pull request (svgs branch with duration branch) I can do it if you want... Just tell me when you think it is ready...

I did it on a fork because I went on and did it without planing with you how I would do it. My nick on IRC is pereira_alex, and I would like for it to go in exactly like you want it. Please feel free to talk with me there.

alexjp commented 7 years ago

Question1: Do we need in Now Dock a different slider to set animations, or we can use just the plasma setting ?

Well ... one may like faster or slower animation speed, but more importantly, for nowdock to have no animations at all, So i think so, but its you opinion that matters.

Question2: You can use for your durationTime a Real value which can give you 1.5 that you needed in some cases...

I tried to do a 0/1/2/3 values as 0 times faster, 1 equal, 2 times slower, 3 times slower. I tried to not give 300ms or 500ms, because some animations had slighter less time that others. This should allow you to do the animation time you want, and the user to just "make it slower or faster".

alexjp commented 7 years ago

Notice1: There are some cases that the duration shouldnt be changed because it affects the befavior of the plasmoid and not the visual speed... Dont worry about them when I will merge I will take care of them... When you think you are ready make a pull request and I am going to tweak any small changes needed... :)

Let me see if there is latest changed to svg branch and resync. After that I will do a pull request. I have been using it with setting 1, and i like it ( slightly faster than it was and it works well and nicelly animated still ).

psifidotos commented 7 years ago

@alexjp I have merged your branch to alex branch in my repository... Use this for testing and etc... There are some animations that I dont find quit right ... I am going to try for duration x2 (the default to be the previous setting.. and x1 that would mean double speed... )

alexjp commented 7 years ago

Looks very nice ! Nice config window redesign :)

I will close this ... If i catch a bug I will report it.