* 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
* Fix docs.rs build issues for eframe, egui-winit, egui_glium, egui_glow
I hope we can get rid of the `tts` crate very soon,
now that AcessKit has landed. It is only used for web atm.
Should probably be removed from all native libraries.
* Update changelogs
* working. but x11 blurry
* fixed x11 blurry. was just accidentally using multisampling even when user didnt request it
* allow dbg macro temporarily
* add windows WGL fallback support when EGL fails
* fmt
* glutin features explicitly added
* extract glutin context creation into a fn
* fix warnings
* 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>
* Add depth stencil initialization to `Painter`
* Move depth stencil initialization into `resize_and_generate_depth_texture_view`, and call it in `set_window` and `on_window_resized`
* Allow for depth texture in WASM builds
* change `map` to `if let` statement
* use reference for render state
* Clean up descriptors and move texture generation to on resize events
* remove unused field from WebOptions
* Don't show window until after initialization
Shortens #1802, but does not completely solve it
* format code
* Present first frame immediately before showing window
This resolves the white flash almost completely, but is a hack. Window
visibility should be derived from the AppOutput, and the first frame
should not be painted before the event loop has processed initial
events.
Working on a better implementation.
* Integrate window showing with AppOutput
This allows an app to keep the window hidden (never shown) by calling
Frame.set_visible(false) on the first update. This includes a slightly
less nasty hack than the last commit did.
Also fixes an accidental cross-contamination of pull requests.
* fmt
* add comments
* add comments
* add comments
* add comments
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
* eframe: Repaint immediately on RepaintAsap, fixes#903
This completely eliminates the white flickering seen on Windows when
rapidly resizing a window on the glow backend. The reason that happens
is because DWM only waits for the resize event to be delivered before
displaying the window at its new size. You must repaint synchronously
inside that iteration of the event loop or else you get flickering.
* Differentiate between RepaintAsap and RepaintNext
RepaintNext looks like it is indeed needed in at least one case instead
of RepaintAsap.
* Use RepaintNext in more situations
Starting to understand why this was the behavior. It looks like only a
few special cases should be given RepaintAsap, such as the window being
resized. All other cases should be RepaintNext, as it can wait.
Using RepaintAsap in all situations will cause things like lag when
changing a slider by keyboard with a high key repeat rate.
* Add explanatory comments
I am a total hypocrite for forgetting to add these.
* Rename RepaintAsap to RepaintNow
There is no notion of "possibility" here like there is when waiting for
RedrawEventsCleared. RepaintNow causes an immediate repaint no matter
what.
* Fix RepaintNow comment
"Delays" is ambiguous.
* 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
* introduce new wgpu configuration option to allow configuring wgpu renderer
* use new options with wgpu web painter
* use on_surface_error callback
* changelog update
* cleanup
* changelog and comment fixes
* eframe web: Add WebInfo::user_agent
* Deprecate `Modifier::ALT_SHIFT`
* Add code for formatting Modifiers and Key
* Add type KeyboardShortcut
* Code cleanup
* Add Context::os/set_os to query/set what OS egui believes it is on
* Add Fonts::has_glyph(s)
* Add helper function for formatting keyboard shortcuts
* Faster code
* Add way to set a shortcut text on menu buttons
* Cleanup
* format_keyboard_shortcut -> format_shortcut
* Add TODO about supporting more keyboard sumbols
* Modifiers::plus
* Use the new keyboard shortcuts in emark editor demo
* Explain why ALT+SHIFT is a bad modifier combo
* Fix doctest
* wgpu renderer now always requires a RenderPass being passed in
This also implies that it no longer owns the depth buffer! (why would it anyways!)
* wgpu-renderer now passes a command encoder to prepare
* add changelog entries
* fixup changelogs, fix variable name
* basic working wgpu @ webgl on websys
* fix glow compile error
* introduced WebPainter trait, provide wgpu renderstate
* WebPainterWgpu destroy implemented
* make custom3d demo work on wgpu backend
* changelog entry for wgpu support eframe wasm
* remove temporary logging hack
* stop using pollster for web
we're actually not allowed to block - this only worked because wgpu on webgl doesn't actually cause anything blocking. However, when trying webgpu this became an issue
* revert cargo update
* compile error if neither glow nor wgpu features are enabled
* code cleanup
* Error handling
* Update changelog with link
* Make sure --all-features work
* Select best framebuffer format from the available ones
* update to wasm-bindgen 0.2.83
* Fix typo
* Clean up Cargo.toml
* Log about using the wgpu painter
* fixup wgpu labels
* fix custom3d_wgpu_shader ub padding
* remove duplicated uniforms struct in wgsl shader for custom3d
* Update docs: add async/await to the web 'start' function
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>