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

OS independent Zoom factor & serialization thereof #1448

Merged
merged 6 commits into from
Feb 28, 2023

Conversation

Wumpf
Copy link
Member

@Wumpf Wumpf commented Feb 28, 2023

  • Command palette actions for zoom in/out/reset
  • Zoom factor is now an OS scaling independent factor that is used every frame to determine pixels_from_points. This way users can move around the window and it keeps the zoom factor
  • show zoom factor in the menu
  • Zoom is now serialized out. Fixes Save UI scale factor #1351

image

image

Checklist

@Wumpf Wumpf added ui concerns graphical user interface 📺 re_viewer affects re_viewer itself labels Feb 28, 2023
Copy link
Member

@emilk emilk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works great!

crates/re_viewer/src/app.rs Outdated Show resolved Hide resolved
Copy link
Member

@teh-cmc teh-cmc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code LGTM, but this breaks the web version, at least on Linux (both Firefox & Chromium).

No issue on main.

23-02-28_18.22.58.patched.mp4

@Wumpf
Copy link
Member Author

Wumpf commented Feb 28, 2023

great catch @teh-cmc! I incorrectly assumed it would not change web behavior and didn't test! 😳

@Wumpf Wumpf requested a review from teh-cmc February 28, 2023 18:53
@Wumpf
Copy link
Member Author

Wumpf commented Feb 28, 2023

fixed web!

@Wumpf Wumpf merged commit 867d0f0 into main Feb 28, 2023
@Wumpf Wumpf deleted the andreas/save-scale-factor branch February 28, 2023 20:08
emilk pushed a commit that referenced this pull request Mar 2, 2023
* Add Zoom in/out/reset to command palette
* Use screen independent zoom factor and serialize it with app state
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📺 re_viewer affects re_viewer itself ui concerns graphical user interface
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Save UI scale factor
3 participants