friction2d / friction

Friction Graphics
https://friction.graphics
GNU General Public License v3.0
294 stars 15 forks source link

Graph view lacks a way of zooming the time horizontally #313

Open pgilfernandez opened 5 days ago

pgilfernandez commented 5 days ago

The only way of zooming is the "fit vertical" but:

In the "keyframes timeline" you can do:

In the "graph timeline" you can do:

Maybe I'm missing something but there is not an option to zoom in/out HORIZONTALLY while in the "graph timeline"

I would say that the UX way would be to set "ctrl/command + shift + mouse scroll"... but I don't know, maybe it's not the best way. What I really mean is that this feature is missing and it would be useful.

Thanks!

rodlie commented 3 days ago

This is a duplicate of #160

Will look into this later today.

rodlie commented 3 days ago

So, just add ctrl+wheel to zoom? like this:

https://github.com/user-attachments/assets/0f7684eb-816b-4863-af1c-bacfe7357e07

adambelis commented 2 days ago

ah yes this seems to fix issue thanks .

also noticed that Alt+scrolling is behiwing strangely seemst o always scroll down . doies not seems like very suful feature to me . if iw tould scroll letf to right that seeesm to be more useful but this should be probably new issue.

simular problem shift+alt will always zoomout. agan felles glichy and not very useful i would rather just ignore alt in this scenario if there is no useful feature.

contrl+shif scrolling should zoom in anod out in both axies currently one is always ignored

rodlie commented 2 days ago

also noticed that Alt+scrolling is behiwing strangely seemst o always scroll down . doies not seems like very suful feature to me

Then don't use it ;) The timeline/graph does not use the Alt modifier for anything.

But Qt does(?): https://forum.qt.io/topic/120028/wheel-event-direction-changing-when-pressing-alt-key

contrl+shif scrolling should zoom in anod out in both axies currently one is always ignored

ctrl+shift does nothing in the code, you either use ctrl or shift. What do you mean by both axies?

adambelis commented 2 days ago

i am very used to tring all modifiers since every app . Its not best us if if modifier does nothing useless other then defoult behavior :D .

for ctrl+shift it is more of feature request

I'm imagaging something like scaling in time + in values ate the same time

https://github.com/user-attachments/assets/8296dbce-0a19-4387-9552-6285b9f13c41

rodlie commented 2 days ago

i am very used to tring all modifiers since every app . Its not best us if if modifier does nothing useless other then defoult behavior :D .

Looking at the code we do not use the Alt modifier in the timeline/graph, since we don't capture that event it just gets propagated up the chain in Qt and something default is used I assume. We should probably capture Alt events and ignore them if we don't use them, that way "odd" behavior does not happen.

for ctrl+shift it is more of feature request

Ok will look into that.

Will reopen this issue, else it will be forgotten ;)

adambelis commented 2 days ago

or i can open new issue so its less messy ?

rodlie commented 2 days ago

Sure, that also works.

adambelis commented 2 days ago

https://github.com/friction2d/friction/issues/320