- Blur no longer expands the shadow geometry, but instead is clamped to
avoid overlapping drawing calls.
- Overlay now handles hit tests correctly with regards to the original
relative widget.
- Align was using an Into conversion that wasn't actually correct,
causing the contents to not actually get aligned in some situations.
- On Linux, `fm-match` is used to query for the default fonts.
- DynamicComponents now have their own trait and can now be specified
with a constant or dynamic.
- Roboto Flex is now always loaded when the feature is enabled.
Overriding the default sans serif font prefers the overridden value,
then roboto, then the result of fc-match/fontdb's default.
- Button now supports background colors being set on a transparent
button.
Debug printing widgets was quite verbose. While developing a widget, you
often want to see a full debug printout, but this feature assumes that
debug printing a WidgetInstance should show a summary of the widget, not
a full debug printout containing cached glyph information of every
label.
By default, summarize just calls Debug, but this extra layer allows
widgets to provide a more condensed summary and exclude details like
caches.
Originally, adding dbg!() around the theme example's UI yielded a
whopping 20,324 lines of text. The summary code only prints 3,858
lines.
Closes#60
Stepping in sliders is a compromise due to the flexibility of the
current slider implementation. I don't want to force types to implement
Add, and I don't like forcing types to require a Step (ie, what's the
appropriate value for f32 to specify as its next value?). Using a
percentage combined with lerp keeps the implementation fairly
straightfoward, although I remember experiencing this type of
configuration in another UI framework a long time ago and thinking it
was a little annoying to work with.
Ultimately, setting actual step boundaries can be done by customizing
the type that the slider is operating over. I feel like that's a much
more powerful design than I've experienced in previous frameworks, so
I'm hoping this percent step behavior is a reasonable compromise.
The issue was that my last set of changes were causing the animations to
restart, causing the animation to keep being extended to another 150ms.
I think the only way for this to work is to switch to an event
mechanism to notify widgets once they've been invalidated. This event
could include a parameter stating whether it was a direct invalidation
or an invalidation due to another widget in the hierarchy. Button
doesn't really care about the rest of the hierarchy, it only cares about
its own state, and the cache key was including too many changes.
Scroll was previously taking the graphics region as its control size as
opposed to the constraints. This was due to this code originally living
in redraw. This fixes scroll areas being able to scroll their contents
fully when sharing window space with other widgts.