Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow resizing via (Ctrl+)mousewheel + pinch-to-zoom #189

Open
rugk opened this issue Apr 25, 2019 · 3 comments
Open

Allow resizing via (Ctrl+)mousewheel + pinch-to-zoom #189

rugk opened this issue Apr 25, 2019 · 3 comments
Assignees
Labels
enhancement New feature or request usability/UX

Comments

@rugk
Copy link
Owner

rugk commented Apr 25, 2019

I'd suggest resizing the QR via mousewheel event instead of the textarea.

by @bfred-it in #57 (comment)

That's especially useful for touch devices.


Maybe we can intercept the page zoom on Ctrl+scroll wheel, that currently "works" i.e. leads to:
image

@eridilla
Copy link

Hi, could I work on this?

@rugk
Copy link
Owner Author

rugk commented Oct 19, 2022

@eridilla Sure, you can. The UX needs some testing here, i.e. IÄm not sure what is most useful.
For a first try I would say

  • "Ctrl+mouse wheel" should resize
  • "Ctrl+plus/minus key" should resize

So I just tested the current state and while + and - key do not work (the last two points) - it just resizes the tab I have open, it seems that mouse wheel already works. It sometimes resizes the tab/website, too, but it certainly also zooms

Maybe though:

  • that zoom level should possibly be remembered and used/applied when opening the next time, so that you have a persistent zoom (via this mode) and a temporary (via the corner that works as usual, currently)
    This is similar to how Firefox treats the zoom by default: each website remembers it's zoom level.

Technically, you may experiment between:

Please also have a look at the ideas in #57

Firefox 105.0.2 (64-bit) on Linux/Fedora

@eridilla
Copy link

@rugk Hey, I have implemented the zoom function using the keyboard, but I thought that it's generally not a good idea to overwrite basic key binds like "Ctrl + plus/minus" and also when I tried, I haven't found a way that made it only zoom the extension and not the whole tab, so instead I made it so it listens to "Alt + plus/minus" and added a little tooltip for it. The zoom levels have a boundary too so the generated code doesn't move in the container and stays centered. The zoom also persists after reopening the extension like you mentioned in your reply.

Regarding the pinch zoom, I don't have a means to test that function if I would work on it, so I haven't looked at that.

I have made a pull request from my fork with my contributions. If you find any issues with what I wrote please let me know so I can learn as much as possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request usability/UX
Projects
None yet
Development

No branches or pull requests

2 participants