* add method for requesting attention to the main window
* use another enum member for user attention type instead of nested `Option`s
(also, document the enum members now that they don't mirror `winit`)
* update the docstring
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
* add an example app for testing window attention requests
* Apply suggestions from code review
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
* remove `chrono` dependency and improve the attention example's readability
---------
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
* Replace tracing crate with log
It's just so much simpler to use
* Add `bacon wasm` job
* eframe: add a WebLogger for piping log events to the web console
* Clear color values are not explicitely sent to the rendering backend as-is.
Previously, converting from Color32 to Rgba caused an srgb->linear conversion. This conversion is incorrect if the backbuffer doesn't perform automatic conversion from linear->srgb (lack of this conversion is generally what egui assumes!).
* fill in pr numbers in changelog
* Epi comment fix
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
* Color32 comment fix
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
* move changelog line
* rename fix
* use backticks in doc
---------
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
* Revert "fix all clippy lints and remove them from allow list in cranky (#2419)"
This reverts commit 930ef2db38.
* Explain the cranky lints better
* Add Color32::gamma_multiply
* Remove unused pub use
* Remove non-existing crate category
* Improve color test with more lines
* Improve the look of thin lines, making them look weaker
Before they looked were too strong for the thickness.
* Use asserts for shader compilations
* Update changelogs
* eframe::run_native: return errors instead of crashing
* Detect and handle glutin errors
* egui_demo_app: silence wgpu log spam
* Add trace logs for why eframe is shutting down
* Fix: only save App state once on Mac
* Handle Winit failure
* Log where we load app state from
* Don't panic on zero-sized window
* Clamp loaded window size to not be too tiny to see
* Simplify code: more shared code in window_builder
* Improve code readability
* Fix wasm32 build
* fix android
* Update changelog
* 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>
* Fix key press event
* Add example with key presses
* Changelog line for key_press fix
* PR review improvements
* Add PR link in changelog
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
* Using tracing-subscriber in hello_world example
* Add Key::Plus/Minus/Equals
* Warn if failing to guess OS from User-Agent
* Remove jitter when using Context::set_pixels_per_point
* Demo app: zoom in/out using ⌘+ and ⌘-
* Demo app: make backend panel GUI scale slider better
* Optimize debug builds a bit
* typo
* Update changelog
* Add helper module `egui::gui_zoom` for zooming an app
* Better names, and update changelog
* Combine Plus and Equals keys
* Last fix
* Fix docs
* Use total_cmp for clamping DragValue
* Added test for clamping
* Increase MSRV in all crates
* Increased rust version for github actions and lib.rs
* Inversed ranges are now working properply with clamp_to_range
* Added more tests
Closes https://github.com/emilk/egui/issues/2068
Before this PR, the default font, Ubuntu-Light, was ~11% smaller
than it should have been, and the default monospace font, Hack,
was ~14% smaller. This means that setting the font size `12` in egui
would yield smaller text than using that font size in any other app.
Ooops!
The change is that this PR now takes into account the ttf properties
`units_per_em` and `height_unscaled`.
If your egui application has specified you own font sizes or text styles
you will see the text in your application grow
larger, unless you go in and compensate by dividing all font sizes by
~1.21 for Ubuntu-Light/Proportional and ~1.16 for Hack/Monospace,
and with something else if you are using a custom font!
This effects any use of `FontId`, `RichText::size`, etc.
This PR changes the default `Style::text_styles` to compensate,
so the default egui style should look the same before and after this PR.
Since https://github.com/emilk/egui/pull/1919 we can continue
the application after closing the native window. It therefore makes
more sense to call `frame.close()` to close the native window,
instead of `frame.quit()`.
* Use correct FBO to output
* custom_3d_three-d web
* Update .gitignore
* Do not free the FBO
* Use three-d 0.13
* ThreeDApp
* Only construct model and camera once
* Clean-up and docs
* Web build instructions
* Remove unused dependencies
* Update Cargo.lock
* Fix build
* More fixes
* omg