Skip to content

Support mouse wheel zoom editor font size #8064

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

Closed
ciceronianus opened this issue Apr 20, 2023 · 7 comments
Closed

Support mouse wheel zoom editor font size #8064

ciceronianus opened this issue Apr 20, 2023 · 7 comments
Assignees
Milestone

Comments

@ciceronianus
Copy link

In what scenarios do you need this feature?

Sometimes the font can be toos mall for my eyes. In a such case, I would like to simply increase it by zooming-in (increasing its size).

Describe the optimal solution

ObsidianMD allwos for using ctrl + scroll wheel to increase and decrease zoom / font-size. I find it very useful. Same UI/UX is being used by internet browsers and other apps.

Describe the candidate solution

No response

Other information

No response

@88250 88250 changed the title Use mouse scroll wheel while holding ctrl to zoom-in and zoom-out (aka changing the font size) Use mouse scroll wheel while holding Ctrl to zoom-in and zoom-out (aka changing the font size) Apr 24, 2023
@88250 88250 changed the title Use mouse scroll wheel while holding Ctrl to zoom-in and zoom-out (aka changing the font size) Support mouse wheel zoom interface May 9, 2023
@88250
Copy link
Member

88250 commented May 9, 2023

We intend to support overall interface scaling, not just editor font scaling, thanks.

@88250 88250 added this to the 2.8.8 milestone May 9, 2023
@mozhux
Copy link

mozhux commented May 9, 2023

单独的编辑器字体缩放也是有需求的。。这两个还是不太一样的

@zxhd863943427
Copy link
Contributor

加一,我觉得整体缩放已经有+-了,没必要这个

@Zuoqiu-Yingyi
Copy link
Contributor

我说一下已经踩过的坑:

  1. mousewhell 事件的监听器不能绑定在 window, 否则会被 PDF Ctrl + whell 缩放影响, 建议绑定在 document
  2. 同上述原因, 事件监听器最好判断一下事件触发位置是否在编辑器 protyle-wysiwyg, b3-typography, protyle-title 内部, 以避免缩放 PDF 时发生干扰
  3. 浏览器访问时最好使用如下方案阻止浏览器原生缩放(全局缩放)
    https://github.com/Zuoqiu-Yingyi/siyuan-theme-dark-plus/blob/d5841074feb2ebc4aaf3f9eb9fe9bea5c80d2488/script/utils/dom.js#L862-L899

@88250 88250 changed the title Support mouse wheel zoom interface Support mouse wheel zoom editor font size May 11, 2023
Vanessa219 added a commit that referenced this issue May 11, 2023
Zuoqiu-Yingyi added a commit to Zuoqiu-Yingyi/siyuan-theme-dark-plus that referenced this issue May 12, 2023
…or font size with the mouse wheel.

Adapt: [Issue #8064 · siyuan-note/siyuan](siyuan-note/siyuan#8064)
@liao-zh
Copy link

liao-zh commented May 16, 2023

Is there a way to switch back to the original font size after scrolling? ctrl+0 does not work. Hope for such a shortcut.
In addition, when using ctrl++/- or ctrl+wheel, it is hard to know the exact current zoom level. Hope there is a graphic indicator (one row for overall, one for the font size) similar to that in e.g. Edge browser.

@Zuoqiu-Yingyi
Copy link
Contributor

Is there a way to switch back to the original font size after scrolling?

This is a quick way to adjust Settings > Editor > Font Size option. Original font size doesn't actually exist.

@liao-zh
Copy link

liao-zh commented May 16, 2023

This is a quick way to adjust Settings > Editor > Font Size option. Original font size doesn't actually exis

I see, Thanks.

Still wish for a zoom level indicator for visual adjustments.

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

7 participants