<!--
Please read the "Making a PR" section of
[`CONTRIBUTING.md`](https://github.com/emilk/egui/blob/master/CONTRIBUTING.md)
before opening a Pull Request!
* Keep your PR:s small and focused.
* If applicable, add a screenshot or gif.
* If it is a non-trivial addition, consider adding a demo for it to
`egui_demo_lib`, or a new example.
* Do NOT open PR:s from your `master` branch, as that makes it hard for
maintainers to add commits to your PR.
* Remember to run `cargo fmt` and `cargo cranky`.
* Open the PR as a draft until you have self-reviewed it and run
`./scripts/check.sh`.
* When you have addressed a PR comment, mark it as resolved.
Please be patient! I will review you PR, but my time is limited!
-->
If no widget is focused (such as when an application just started or
after Escape was pressed), pressing Shift+Tab does not set the focus to
the last widget. I think this PR fixes that.
* Functions that take Stroke were updated to take Into<Stroke> to make
them consistent with other Into<Stroke> parameters.
* Vec2 implements DivAssign<f32>, to make it consistent with already
implementing MulAssign<f32> and Div<f32>.
* Vec2::angled() uses sin_cos() rather than an individual sin() and
cos() call for an immeasurable but hypothetical performance improvement.
* Disable the lock_reentry_single_thread() mutex test. Lock()ing twice
on the same thread is not guaranteed to panic.
* Closes <https://github.com/emilk/egui/issues/3419>.
* Move scroll bar spacing settings to a `struct ScrollSpacing`
* Add a demo for changing scroll bar appearance
* Add setting for ScrollBarVisibility in demo
* Add `#[inline]` to a `ScrollArea` builder methods
* Refactor how scroll bar show/hide is computed
* Add support for floating scroll bars
* Tweak color and opacity of the scroll handle
* Allow allocating a fixed size even for floating scroll bars
* Add three pre-sets of scroll bars: solid, thin, floating
* Use floating scroll bars as the default
* Fix id-clash with bidir scroll areas
* Improve demo
* Fix doclink
* Remove reset button from demo
* Fix doclinks
* Fix visual artifact with thin rounded rectangles
* Fix doclink
* typos
* Revert ttf-parser from 0.19.2 to 0.19.1
0.19.2's doesn't work with wasm in debug builds
* Update to poll-promise 0.3.0
* Publish new web demo
* Fix typo in changelog
* Explain why image_viewer is not part of the official web demo app
* Fix typos
* Make rfd native-only dependency
* eframe README: explain how to enable copy/paste
* Implement Debug for a couple of structs
* Code cleanup
* Better docs
* profile ron serialization
* CI: Allow "exclude from changelog" as the only label
* Update images in README.md
* Add ferris image to hello_world example
* Clean up and improve README.md, with top-level link to Rerun
* Move sections around
* Give credit to recent big-time contributors in the main README.md
* Better named profiling scopes
* Document everything in memory.rs
* Better doc-strings
* Add a section about dependencies to the main README.md
* Improve egui_extras docs
* fix typos
* Add Row::text
* Rename elide_at_width -> truncate_at_width
* Move text layout tests to own module
* Add test to check that elision character is always included
* Include elision character in more circumstances
* Append overflow character if we can't replace
* Always append … when eliding
* Add a secondary text to the text layout demo
* Remove calls to `set_ime_allowed`
* Allow IME if `text_cursor_pos` is `Some`
* Only call `Window::set_ime_allowed` when necessary
* allow_ime doesn't need to be atomic
* Remove unused imports
* Fix assignment
* `std::borrow::Cow<'_, str>` now implements `TextBuffer`
* Add pr number
* Remove line from CHANGELOG.md
* Add missing semicolons
* remove extra semicolon
---------
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
When exiting my application, it would freeze for around a minute waiting to finish writing ca. 40MB to file storage.
Some quick profiling revealed that it was spending all that time in `File::write`,
presumably making a large number of system calls writing tiny amounts of data at a time.
We can avoid this by buffering writes using a `BufWriter`, just like we already do with `BufReader`.
With this change, my application takes around 1-2 seconds to exit, with the majority of that time spent serializing `ron`.
I'm sure there are further potential performance improvements there, but this is already an order of magnitude or two better.
I also fixed the call to `log::warn!`, which was using incorrect formatting syntax and not including the error message.