-
Notifications
You must be signed in to change notification settings - Fork 407
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Add buttons and shortcuts for zooming the whole GUI #265
Conversation
You can now zoom the whole GUI with ⌘+ and ⌘- (or Ctrl+Plus/Ctrl+Minus), just like on the web, or an electron app.
getting |
Ooh, thanks for finding those problems! I'll get right on it |
There may still be some work to do… Seems like EDIT: will be fixed by emilk/egui#2256 |
|
||
// On Mac, we share the same space as the native red/yellow/green close/minimize/maximize buttons. | ||
// This means we need to make room for them. | ||
let native_buttons_size_in_native_scale = egui::vec2(64.0, 24.0); // source: I measured /emilk |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
did you try this on Windows?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a Mac-only setting.
// On the web the browser controls the zoom | ||
if !frame.is_web() { | ||
egui::gui_zoom::zoom_menu_buttons(ui, frame.info().native_pixels_per_point); | ||
ui.separator(); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
actually I can't zoom at all on the web since we grab cmd +
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where do we grab cmd +
?
I can zoom with cmd+/- on Mac Firefox on https://www.egui.rs/ - can you?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah apologies, I meant cmd + scrollwheel. Cmd + works
# Conflicts: # Cargo.lock # Cargo.toml
Nice! A little bit disappointing that it doesn't seem to respond to ctrl+ or ctrl- when using the keys on the num pad on Windows by default. |
Filed a bug for that now! ⬆️ |
You can now zoom the whole GUI with ⌘+ and ⌘- (or Ctrl+Plus/Ctrl+Minus), just like on the web, or an electron app.
Based on emilk/egui#2239
Checklist
CHANGELOG.md
(if this is a big enough change to warrant it)