nkh / P5-App-Asciio

Plain ASCII diagram
https://nkh.github.io/P5-App-Asciio/
53 stars 4 forks source link

add mouse wheel to zoom in and out in GUI #117

Closed qindapao closed 1 year ago

qindapao commented 1 year ago

https://github.com/qindapao/P5-App-Asciio/commit/e10bddd7c44439052de5a9e3d904034f13b81924

@nkh

It should be convenient to do this on the GUI. Because the default mouse wheel operation is to drag the scroll bar up and down. So I gave Ctrl+mousewheel

Also I changed one more thing

room_err

This is the previous room operation. You can see that the relative position of the element has changed.This may not be what the user wants

room_right

This is changed, try to keep the relative position of the elements static when the scroll bar is adjustable. However, it still cannot be adjusted when the scroll bar has reached both ends.

nkh commented 1 year ago

@qindapao I agree, let me check it and merge

nkh commented 1 year ago

I squashed: 1a9fde1 FIXED: code review for mouse scroll (quin/add_mouse_scroll) (8 days ago, QinQing) e10bddd ADDED: mouse scroll room in and out (11 days ago, QinQing)

into: 4163b43 ADDED: mouse scroll zoom in and out (HEAD -> master, origin/master, origin/HEAD) (11 days ago, QinQing)

You can update your master and throw away your add_mouse_scroll branch

As I wrote earlier, 'C00-scroll-up/down' are not signals I get on my machine, so your patch doesn't work for me, probably because my laptop doesn't have a scroll button, I will have a look at it.

qindapao commented 1 year ago

@nkh

I use a traditional physical mouse with a scroll wheel. Can scroll up and down. Maybe your laptop's mouse is a different thing, maybe we can fix it with an upgrade.