libcosmic/src/widget
Ian Douglas Scott b85c504d72
theme: Use boxed functions instead fn pointers (#99)
This is more general, and necessary if the custom theming is dynamically
generated.

Iced's builtin theme also uses `Box`ed `Fn`, or `Rc` where clone is
required, so this seems reasonable.

Only `Text` is left using `fn`, since it needs to be `Copy`. Hopefully
that can be changed in Iced at some point.

`::custom` methods are added to make these variants a little more
convenient to construct. This replaces a couple `From` implementations,
which are potentially problematic with a generic.
2023-04-28 16:04:57 -07:00
..
list theme: Use boxed functions instead fn pointers (#99) 2023-04-28 16:04:57 -07:00
rectangle_tracker chore: apply cargo fmt 2023-01-04 05:46:24 +01:00
search theme: Use boxed functions instead fn pointers (#99) 2023-04-28 16:04:57 -07:00
segmented_button improv(segmented-button): extra padding for close icon 2023-02-14 14:56:29 -07:00
settings fix(settings): wrong title text size for control 2023-02-16 06:22:30 +01:00
spin_button theme: Use boxed functions instead fn pointers (#99) 2023-04-28 16:04:57 -07:00
aspect_ratio.rs chore: apply cargo fmt 2023-01-04 05:46:24 +01:00
button.rs chore: apply cargo fmt 2023-01-04 05:46:24 +01:00
cosmic_container.rs refactor(container): make layer optional and export as container 2023-02-28 12:26:38 -07:00
header_bar.rs fix(headerbar): handle empty title string 2023-01-30 21:57:24 +01:00
icon.rs theme: Use boxed functions instead fn pointers (#99) 2023-04-28 16:04:57 -07:00
mod.rs wip: use CosmicContainer 2023-02-28 12:26:38 -07:00
nav_bar.rs theme: Use boxed functions instead fn pointers (#99) 2023-04-28 16:04:57 -07:00
nav_bar_toggle.rs feat(iconsource): additional helper methods for creating handles 2023-01-19 19:58:31 +01:00
scrollable.rs chore: apply cargo fmt 2023-01-04 05:46:24 +01:00
segmented_selection.rs feat!(segmented-button): improved interfaces and documentation 2023-01-19 19:58:31 +01:00
text.rs feat(widget): add text function with Cow<str> input 2023-01-30 21:57:24 +01:00
toggler.rs wip: Various refactorings and improvements 2022-12-06 16:14:39 +01:00
view_switcher.rs feat!(segmented-button): improved interfaces and documentation 2023-01-19 19:58:31 +01:00
warning.rs theme: Use boxed functions instead fn pointers (#99) 2023-04-28 16:04:57 -07:00