* 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.
* Imoprove docs for callback shapes
* Improve docs for loader traits
* Use snake_case for feature `all_loaders`
* Make loaders publix
* Slightly better error message on image load failure
* Improve image loading error messages
* Use `bytes://` schema for included bytes loader
* Try user loaders first
* Move `image_loading_spinners` to `Visuals`
* Unify and simplify code
* Make the main text of `Button` optional
This largely makes ImageButton obsolete
* Fix docstrings
* Better docs
* typos
* Use the more explicit `egui_extras::install_image_loaders`
* Simplify `Image::paint_at` function
* Add syntax highlighing feature to egui_extras
Enable "syntect" feature for great syntax highlighting of any language.
If not a simple fallback is used that works fine for C++, Rust, Python
* Check --no-default-features of egui_extras on CI
* spelling
* Fix building egui_extras without additional features
* add egui logo to widget gallery
* improve "no image loaders" error message
* rework static URIs to accept `Cow<'static>`
* remove `RetainedImage` from `http_app` in `egui_demo_app`
* hide `RetainedImage` from docs
* use `ui.image`/`Image` over `RawImage`
* remove last remanant of `RawImage`
* remove unused doc link
* add style option to disable image spinners
* use `Into<Image>` instead of `Into<ImageSource>` to allow configuring the underlying image
* propagate `image_options` through `ImageButton`
* calculate image size properly in `Button`
* properly calculate size in `ImageButton`
* Update crates/egui/src/widgets/image.rs
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
* improve no image loaders error message
* add `size()` helper to `TexturePoll`
* try get size from poll in `Button`
* add `paint_at` to `Spinner`
* use `Spinner::paint_at` and hover on image button response
* `show_spinner` -> `show_loading_spinner`
* avoid `allocate_ui` in `Image` when painting spinner
* make icon smaller + remove old texture
* add `load_and_calculate_size` + expose `paint_image_at`
* update `egui_plot` to paint image in the right place
* Add helpers for painting an ImageSource directly
* Use max_size=INF as default
* Use new API in WidgetGallery
* Make egui_demo_app work by default
* Remove Option from scale
* Refactor ImageSize
* Fix docstring
* Small refactor
---------
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
* Add puffin profile scopes to the startup and running of eframe
* puffin_profiler example: start puffin right away
* cargo format let-else statements
* More profile scopes
* Add some `#[inline]`
* Standardize puffin profile scope definitions
* standardize again
* Silence warning when puffin is disabled
* rework loading around `Arc<Loaders>`
* use `Bytes` instead of splitting api
* remove unwraps in `texture_handle`
* make `FileLoader` optional under `file` feature
* hide http load error stack trace from UI
* implement image fit
* support more image sources
* center spinner if we know size ahead of time
* allocate final size for spinner
* improve image format guessing
* remove `ui.image`, `Image`, add `RawImage`
* deprecate `RetainedImage`
* `image2` -> `image`
* add viewer example
* update `examples/image` + remove `svg` and `download_image` exapmles
* fix lints and tests
* fix doc link
* add image controls to `images` example
* add more `From` str-like types
* add api to forget all images
* fix max size
* do not scale original size unless necessary
* fix doc link
* add more docs for `Image` and `RawImage`
* make paint_at `pub`
* update `ImageButton` to use new `Image` API
* fix double rendering
* `SizeHint::Original` -> `Scale` + remove `Option` wrapper
* Update crates/egui/src/load.rs
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
* remove special `None` value for `forget`
* Update crates/egui/src/load.rs
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
* add more examples to `ui.image` + add `include_image` macro
* Update crates/egui/src/ui.rs
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
* update `menu_image_button` to use `ImageSource`
* `OrderedFloat::get` -> `into_inner`
* derive `Eq` on `SizedTexture`
* add `id` to loaders + `is_installed` check
* move `images` to demo + simplify `images` example
* log trace when installing loaders
* fix lint
* fix doc link
* add more documentation
* more `egui_extras::loaders` docs
* Update examples/images/src/main.rs
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
* update `images` example screenshots + readme
* remove unused `rfd` from `images` example
* Update crates/egui_extras/src/loaders/ehttp_loader.rs
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
* add `must_use` on `Image` and `RawImage`
* document `loaders::install` multiple call safety
* Update crates/egui_extras/Cargo.toml
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
* reshuffle `is_loader_installed`
* make `include_image` produce `ImageSource` + update docs
* update `include_image` docs
* remove `None` mentions from loader `forget`
* inline `From` texture id + size for `SizedTexture`
* add warning about statically known path
* change image load error + use in image button
* add `.size()` to `Image`
* Update crates/egui_demo_app/Cargo.toml
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
* add explanations to image viewer ui
---------
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>