Commit Graph

6 Commits

Author SHA1 Message Date
Olivier FAURE 125dab7949
Document more items (#899)
Make missing_docs annotations more granular.
2025-03-21 14:50:16 +00:00
Daniel McNab 88f453cbfe
Make `allow(missing_docs)` for widgets much more tightly scoped (#898)
Any new widget code needs to have full docs.
Not having `missing_docs` trigger by default for new widgets is quite
bad.

See #875 and #882 for cases where this over-broad allow has bitten us.

The comment about not using `expect(missing_docs)` because of
rust-analyzer is confusing to me; I don't run into an issue. It might
have been https://github.com/rust-lang/rust/issues/130021, which is now
fixed. That comment should have had a link to an upstream issue for more
context.
2025-03-19 13:14:15 +00:00
Olivier FAURE 3ef84e5605
Change sizes of various screenshots (#897) 2025-03-19 12:09:15 +00:00
Olivier FAURE 60c037dc1f
Add arbitrary properties to widgets (#873)
Add `Properties[Mut]` argument to widget methods.
Add a third TreeArena to sort per-widget arbitrary property values.

For the type-to-value map, I considered the following crates:
- https://docs.rs/typemap/latest/typemap/
- https://crates.io/crates/typemap_rev
- https://crates.io/crates/typemap-ors
- https://github.com/chris-morgan/anymap
- https://github.com/reivilibre/anymap3

Of these, anymap3 is the only one actively maintained (last commit less
than 12 months ago). The code source itself is extremely light and
simple; we may or may not decide to roll out our own implementation down
the line.

Add a BackgroundBrush property used by SizedBox as a proof of concept.

Note that SizedBox still has its `background` field, but we should
expect future widgets to use almost *exclusively* properties; properties
usually shouldn't be redundant with local fields.

To get there, we'll first need to better integrate properties in Xilem.
2025-03-06 11:32:06 +00:00
Olivier FAURE bc8e9fecd2
Switch to Edition 2024 (#880)
I've ignored most of the changes and the projects still compile and test
fine. Changes I did commit:

Add `+ use<>` after functions.
Remove `ref mut` from some patterns.
Bump MSRV.
Apply new rustfmt format.
2025-03-05 13:15:47 +00:00
Olivier FAURE d77b31b892
Reorganize Masonry modules (#848) 2025-01-24 11:24:31 +00:00