Fix zoom and missing View menu items after plugin rebuild#66
Merged
Conversation
CSS document.body.style.zoom does not work reliably in WebKit/WKWebView. Replace with Tauri's WebviewWindow::set_zoom() which uses native webview scaling. Zoom level is now persisted to state.toml via the existing zoom_factor field and restored on app launch and new window creation.
build_app_menu_with_plugins reconstructed the View menu from scratch when plugins added menu items, but only included toggle_left, toggle_right, and focus_sessions — dropping toggle_bottom, zen_mode, zoom_in, zoom_out, and zoom_reset. This caused those menu items and their keyboard accelerators to vanish once any plugin was loaded.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
build_app_menu_with_pluginsreconstructed the View menu from scratch when plugins added menu items, but dropped zoom in/out/reset, zen mode, and toggle bottom panel — causing those items and their keyboard accelerators to vanish once any plugin loaded.document.body.style.zoom(unreliable in WKWebView) to Tauri's nativeWebviewWindow::set_zoom()API. Zoom level is now persisted tostate.tomland restored on app launch and new window creation.Test plan