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

Support for egui_zoom_factor #346

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open

Conversation

dgulotta
Copy link
Contributor

Fixes #338. Seems to work both natively and in the browser. Summary:

  • The screen rect needs to be divided by the zoom factor before passing it to egui.
  • The rects returned by egui then need to be scaled by the zoom factor.
  • Egui's "zoom with keyboard" should be disabled by default in the browser since the browser already handles zoom (and uses the same keyboard shortcut).
  • In raw_input, native_pixels_per_point needs to be set, or else the text looks pixelated when zooming in in the browser.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

egui::Context::set_zoom_factor does not work
1 participant