Skip to content

Add editor font size scroll zoom switch #8297

Closed
@liao-zh

Description

@liao-zh

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

Activity

changed the title [-]Improve zooming experience: unintentional zooms (especially with touchpads)[/-] [+]Add editor font size zoom switch[/+] on May 27, 2023
added this to the 2.8.10 milestone on May 27, 2023
88250

88250 commented on May 27, 2023

@88250
Member

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

changed the title [-]Add editor font size zoom switch[/-] [+]Add editor font size scroll zoom switch[/+] on May 27, 2023
added a commit that references this issue on May 27, 2023
liao-zh

liao-zh commented on May 29, 2023

@liao-zh
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.

liao-zh

liao-zh commented on May 30, 2023

@liao-zh
Author

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

reopened this on May 30, 2023
88250

88250 commented on May 30, 2023

@88250
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @88250@Vanessa219@liao-zh

      Issue actions

        Add editor font size scroll zoom switch · Issue #8297 · siyuan-note/siyuan