Commit graph

12 commits

Author SHA1 Message Date
Tony4dev
0b7e23444a
feat(segmented_button): add len method 2025-02-13 16:22:42 +01:00
Tony4dev
d536341234
fix(segmented_button): model index out of bounds when setting position 2024-12-03 05:14:33 +01:00
Jeremy Soller
2faaeddb05
feat(segmented_button): Support adding divider above items in vertical segmented button 2024-09-11 12:51:19 -06:00
danieleades
8e99406a8b
chore: fixing linter warnings 2023-11-28 20:02:08 +01:00
Jeremy Soller
2df8cb8862 Allow segmented buttons to be indented 2023-11-16 08:06:07 -07:00
Michael Aaron Murphy
4e4eeaac12 feat!(widget): rewrite button & icon widget APIs 2023-09-14 01:38:56 +02:00
Ashley Wulber
6457481ae5 fix: text input layout & cargo fmt 2023-08-24 15:44:29 -04:00
Michael Aaron Murphy
75e80857e2 feat(segmented-button): manually-definable icon colors 2023-02-14 14:56:29 -07:00
Michael Aaron Murphy
4fa61eeafd feat(segmented-button): configurable close icons 2023-02-14 14:56:29 -07:00
Michael Aaron Murphy
e9766389c4
fix(segmented-button): hover style not being applied 2023-01-19 22:32:58 +01:00
Michael Aaron Murphy
2b0227d34f feat(iconsource): additional helper methods for creating handles 2023-01-19 19:58:31 +01:00
Michael Aaron Murphy
b3d550cc5e feat!(segmented-button): improved interfaces and documentation
BREAKING CHANGE: Various type and function names have changed to reflect
themselves better in documentation. Code has been reorganized into
separate modules with a better placement in libcosmic. Most of the
functions, types, and modules now have documentation and examples.

These changes no longer require the `Model` type to define the
data/component type that it stores. The component functionality is now
optional, and it's also possible to associate many components to an item
with one component per type. This has had a side effect of simplifying a
lot of the type signatures in the implementation.

Before, to insert an item into the model, you had to define a
`SegmentedItem` and a `Component` on insert, and get back an ID for that
item. Which makes it difficult to define an item that contains only an
icon or has no components. And requires an extra insert function to
activate the item on insert.

Now, there is a flexible builder-style API for configuring
newly-inserted items in the model. So the complexity for inserting and
retrieving values from the model has decreased significantly
2023-01-19 19:58:31 +01:00