pub fn zoom_with_keyboard_shortcuts(
ctx: &Context,
native_pixels_per_point: Option<f32>
)
Expand description

Let the user scale the GUI (change Context::pixels_per_point) by pressing Cmd+Plus, Cmd+Minus or Cmd+0, just like in a browser.

When using eframe, you want to call this as:

// On web, the browser controls the gui zoom.
if !frame.is_web() {
    egui::gui_zoom::zoom_with_keyboard_shortcuts(
        ctx,
        frame.info().native_pixels_per_point,
    );
}