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

Add editor font size scroll zoom switch #8297

Closed
littlecoby opened this issue May 18, 2023 · 4 comments
Closed

Add editor font size scroll zoom switch #8297

littlecoby opened this issue May 18, 2023 · 4 comments
Assignees
Milestone

Comments

@littlecoby
Copy link

littlecoby commented May 18, 2023

Improve zooming experience: unintentional zooms (especially with touchpads)

In what scenarios do you need this feature?

Currently (v2.8.8) two types of zooming are supported, the overall scaling via ctrl++/- and the editor font size via ctrl+mouse wheel. These features are convenient, in the meantime they also increase the probability of unintentional zooms, which can sometimes be annoying. Two candidate strategies are: reducing the probability of unintentional operations by design, and/or enable easy reversion of the zoom change.

The overall zooming is ok, since ctrl++/- is an infrequently-used combination, zoom change can be counted along with button pressing, and rescue can be easily done via ctrl+0. The newly introduced top bar button also helps (#8212).

The font size zooming is less ok, especially on laptop with touchpads. Both the mouse wheel/touchpad and the ctrl are highly frequently used, zoom change is harder to know by the exact amount of scrolling, and rescue is inconvient (Settings > Editor > Font Size). I've encountered several unintentional zooms in a few days since the introduction of this feature in v2.8.8 (#8064).

Describe the optimal solution

A sensible improvement to the font size zooming is that, the zooming is restricted to one-way so that the font size can only be scaled up, but not scaled down. This restriction is seen on pinching on pads, where pinching in zooms in, pinching out zooms out, but only to the scale before zooming. Zoom change can be easily reverted by pinching out to the extreme.

Although there is no 'original font size' (#8064), the one set in the Settings can be viewed as the most frequently used size, and zooming is only temporary. In such scenario, zooming in but not zooming out is perhaps the more frequent demand. As a result, restriction to one-way zooming is reasonable.

Another solution along the lines of #8212 is to add a popup indicator of the current zoom level (in %) and the font size to the top bar, which helps knowing the current zoom level and reverting the change. Below is an example of the Edge browser.
image

Describe the candidate solution

No response

Other information

No response

@88250 88250 changed the title Improve zooming experience: unintentional zooms (especially with touchpads) Add editor font size zoom switch May 27, 2023
@88250 88250 added this to the 2.8.10 milestone May 27, 2023
@88250
Copy link
Member

88250 commented May 27, 2023

We will add a switch for this feature, thanks for your feedback.

@88250 88250 changed the title Add editor font size zoom switch Add editor font size scroll zoom switch May 27, 2023
Vanessa219 added a commit that referenced this issue May 27, 2023
@littlecoby
Copy link
Author

Is it possible to let the users customize the shortcuts for both the overall scaling and the font size zooming? Maybe something like this draft image.
image

Based on the two observations below, I personally would set ctrl++/- for font size zooming. Customizability would meet diverse demands.
(1) It seems that font size zooming is more commonly used (e.g. Edge, WPS) than the overall scaling (e.g. VSCode).
As for SiYuan, I guess the font size zooming would be more useful, because then I could zoom out to get an overview of long documents. (VSCode has a minimap, which offers an overview)
(2) From my experience and this post, ctrl+touchpad sliding causes unintentional touches somewhat easily. I have not noticed such misoperations from using other apps before, which is perhaps due to the lighter use of ctrl in those apps than in SiYuan.

@littlecoby
Copy link
Author

Or using a dropdown menu to be consistent with the style in settings.
image

@88250 88250 reopened this May 30, 2023
@88250
Copy link
Member

88250 commented May 30, 2023

After thinking about it, from the perspective of being based on the browser, it is more common to use Ctrl+- as the global scaling, and using the mouse+wheel to scale in the editor font size is also in line with the habits of most people.

The main usage scenario of global scaling is to scale the overall appearance on high-resolution screens.

Still keep the original design unchanged, thanks for the feedback.

@88250 88250 closed this as completed May 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants