https://github.com/iced-rs/iced/issues/674
Uses image/svg support in `iced_graphics`. The is not currently using an
atlas, and uses one texture/draw per image. This should be good enough
for now; supporting images with glow is better than not supporting them,
and if something else performs better, that improvement can be made
without any change to the public API.
Apparently "weak dependency features" have been stable since Rust
1.60.0, allowing a feature to enable a feature of a dependency only if
that dependency is enabled elsewhere. So having a separate feature for
this with glow is unnecessary now.
Also remove the `resolver` setting which is redundant on edition 2021.
The `Widget` trait in `iced_pure` needed to change a bit to make the
implementation of `Element::map` possible.
Specifically, the `children` method has been split into `diff` and
`children_state`.
The idea here is to expose a set of "virtual widgets" that can be used with a
`Virtual` widget and its `virtual::State`.
A virtual widget is a widget that does not contain any state, but instead is a
"virtual" representation of the "real" widget. The real widgets are stored in
the `virtual::State`.
Every time a new virtual widget tree is created during `view`, it is compared to
the previous one and "real" widgets are added / removed to the `virtual::State`.
Effectively, this removes the need to keep track of local widget state in the
application state and allows `view` to take an immutable reference to `self`.
To summarize, using this crate should allow users to remove `State` structs
in their application state.
Eventually, the strategy used here may be adopted generally and, as a result,
all of the widgets in `iced_native` would be replaced!