Motivation: I want to replace `cargo-cranky` with workspace lints, first
available in Rust 1.74.
However, `cargo doc` would hange on `wgpu` and `wgpu-core` on 1.74 and
1.75… so now we're on 1.76.
I think this is fine - when 1.78 is released next week we're still two
versions behind the bleeding edge.
…and the branch name is just wrong 🤦
* Closes https://github.com/emilk/egui/issues/3602
You can now zoom any egui app by pressing Cmd+Plus, Cmd+Minus or Cmd+0,
just like in a browser. This will change the current `zoom_factor`
(default 1.0) which is persisted in the egui memory, and is the same for
all viewports.
You can turn off the keyboard shortcuts with `ctx.options_mut(|o|
o.zoom_with_keyboard = false);`
`zoom_factor` can also be explicitly read/written with
`ctx.zoom_factor()` and `ctx.set_zoom_factor()`.
This redefines `pixels_per_point` as `zoom_factor *
native_pixels_per_point`, where `native_pixels_per_point` is whatever is
the native scale factor for the monitor that the current viewport is in.
This adds some complexity to the interaction with winit, since we need
to know the current `zoom_factor` in a lot of places, because all egui
IO is done in ui points. I'm pretty sure this PR fixes a bunch of subtle
bugs though that used to be in this code.
`egui::gui_zoom::zoom_with_keyboard_shortcuts` is now gone, and is no
longer needed, as this is now the default behavior.
`Context::set_pixels_per_point` is still there, but it is recommended
you use `Context::set_zoom_factor` instead.
* Silence a few clippy warnings
* Use named threads
* Remove some deprecated functions
* Document Context and Ui fully
* Use `parking_lot::Mutex` in `eframe`
* Expand clippy.toml files
* build fix
* Refactor repaint logic
* request_repaint_after also fires the request_repaint callback
* Bug fixes
* Add test to egui_demo_app
* build_demo_web: build debug unless --release is specified
* Fix the web backend too
* Run special clippy for wasm, forbidding some types/methods
* Remove wasm_bindgen_check.sh
* Fix typos
* Revert "Remove wasm_bindgen_check.sh"
This reverts commit 92dde25344.
* Only run cranky/clippy once
* squash before rebase
* Update AccessKit, introducing support for editable spinners on Windows and an important fix for navigation order on macOS
* Restore support for increment and decrement actions in DragValue
* Avoid VoiceOver race condition bug
* fix clippy lint
* Tell AccessKit that the default action for a text edit (equivalent to a click) is to set the focus. This matters to some platform adapters.
* Refactor InputState functions for AccessKit actions
* Support the AccessKit SetValue for DragValue; this is the only way for a Windows AT to programmatically adjust the value
* Same for Slider
* Properly associate the slider label with both the slider and the drag value
* Lazily activate egui's AccessKit support
* fix clippy lint
* Update AccessKit
* More documentation, particularly around lazy activation
* Tweak one of the doc comments
* See if I can get AccessKit exempted from the 'missing backticks' lint
* Make PlatformOutput::accesskit_update an Option
* Refactor lazy activation
* Refactor node mutation (again)
* Eliminate the need for an explicit is_accesskit_active method, at least for now
* Fix doc comment
* More refactoring of tree construction; don't depend on Arc::get_mut
* Override a clippy lint; I seem to have no other choice
* Final planned refactor: a more flexible approach to hierarchy
* Last AccessKit update for this PR; includes an important macOS DPI fix
* Move and document the optional accesskit dependency
* Fix comment typo
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
* reformat
* More elegant code for conditionally creating a node
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
* Set step to 1.0 for all integer sliders
* Add doc example for Response::labelled_by
* Clarify a TODO comment I left for myself
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>