Reset zoom level after zooming in/out with mouse wheel / pinch gesture?

Obsidian 0.12.15 - macOS

I noticed that “pinch to zoom” gesture will cause the baseFontSize value in appearance.json to increase/decrease. This is permanent and persists across app launches. There seems to be no simple way to reset it back to the theme’s default, other than deleting the key directly.

Related: ⌘command [+/-] seems to zoom the entire UI (including interface elements, menubar, buttons etc) and is somewhat related, but pressing ⌘cmd+0 only resets that UI zoom level, and not the baseFontSize adjustment.

Am I doing this wrong? Didn’t see anything in the API that we can use either…

1 Like

update: yes I’m aware of this:

but it would awesome if that command was available on the command palette or via a hotkey.

1 Like

Also found that typing this.app.vault.config.baseFontSize in console reveals the current setting. Not sure how to set it though and force the view to redraw…

Ok, more progress… this works (but does not redraw the view)

this.app.vault.setConfig('baseFontSize', 16);

Scratched my own itch and ended up creating my first plugin that solves this issue :tada:

I submitted a PR to get it added to the community repo so just waiting for that to land. It’s available via the regular in-app Community Plugins now.

4 Likes

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.