Commit graph

34 commits

Author SHA1 Message Date
Michael Aaron Murphy
d5b2a2e87c feat(segmented_button): variable-width horizontal button when width is Shrink 2024-01-26 16:39:48 +01:00
Michael Aaron Murphy
d6e23fe977
fix(segmented_button): text bounds off when an icon is used 2024-01-23 22:40:12 +01:00
Michael Aaron Murphy
ca92049ab6 feat(segmented_button): paginate tabs when width is too narrow 2024-01-23 22:09:11 +01:00
Michael Aaron Murphy
05f8ffeef1 fix(segmented_button): clip text that overlaps with close button 2024-01-23 22:09:11 +01:00
Michael Aaron Murphy
bb8be4e3d5 feat(segmented_button): use scroll wheel to switch between tabs 2024-01-22 16:48:18 +01:00
Michael Aaron Murphy
25eea464b9 feat(segmented_button): close tab on middle click 2024-01-22 16:48:18 +01:00
Ashley Wulber
310064ca1d refactor: use theme corner radii everywhere
not all values matched a default value but I picked the next closest in that case
2023-12-13 13:10:39 -05:00
Ashley Wulber
fcfe9ebc59 chore: update iced 2023-12-04 17:53:24 -05:00
Ashley Wulber
17bc373990 clippy fixes 2023-12-04 17:53:24 -05:00
Ashley Wulber
9202383596 chore: update to 0.12 2023-12-04 17:53:24 -05:00
Jeremy Soller
2df8cb8862 Allow segmented buttons to be indented 2023-11-16 08:06:07 -07:00
Ashley Wulber
70077ca985 feat: color picker 2023-10-02 10:24:43 -04:00
Michael Aaron Murphy
8f9fde7fe8 fix(widget): set SegmentedButton icon color to be same as text 2023-09-19 17:22:20 +02:00
Michael Aaron Murphy
48fd076cc8 fix(segmented-button): disappearance of icons from bad layout values 2023-09-14 01:38:56 +02:00
Michael Aaron Murphy
9dbc1be269 refactor(widget): improvements to button and icon widgets 2023-09-14 01:38:56 +02:00
Michael Aaron Murphy
4e4eeaac12 feat!(widget): rewrite button & icon widget APIs 2023-09-14 01:38:56 +02:00
Ashley Wulber
69da283aeb update iced 2023-08-21 15:47:01 -04:00
Michael Aaron Murphy
a8ce524baa refactor: combine open and save dialogs 2023-08-16 16:59:15 +02:00
Ashley Wulber
598bfaa611 feat: icon default fallbacks 2023-07-07 16:58:21 -04:00
Ashley Wulber
850968715c udpate iced to use latest rebase 2023-06-15 20:38:16 +02:00
Michael Aaron Murphy
31f7e97d5b fix: incorrect font weights, sizes, line heights 2023-05-31 00:08:56 +02:00
Ashley Wulber
e056e8c830
Cosmic advanced text (#103)
* wip: update to use cosmic-advanced-text

* use cosmic-advanced-text branch of iced

* fix: line height and spacing for segmented button and update to get svg fix

* fix: spin button styling & spacing

* update iced to fix segmented button border radius

* feat: example improvements

* feat: helper for loading fonts

* feat: add focus style to button

* fix: slider height and iced fixed

* feat: hash icon width and height

* cleanup

* update ci

* refactor: always use lazy feature of iced

* update iced

* update iced

* cleanup & update iced

* update iced: new slider & tiny-skia quad updates

* update iced: fixes for tiny-skia quad rendering with edge case border radius

* re-export iced_runtime & iced_widget

* merge master

* udpate iced

* update iced

* update iced

* update iced

* fix: make rectangle_tracker subscription only return update if there is some

* feat: derive macro for loading a cosmic-config

* feat (cosmic-config): iced subscription

* fix (example): update to rectangle tracker subscription

* fix (cosmic-config)

* refactor(cosmic-config-derive): add support for types with generic parameters

* fix (cosmic-config): feature gate updates for subscription helpers

* feat: support for custom & system themes + move cosmic-theme to libcosmic

* feat: sorta hacky way of creating header bars for libcosmic + update iced to get support for resizable windows in iced-sctk

* update iced

* update and reexport sctk

* fix: applet border radius

* feat (cosmic-theme): add id and name methods

* fix(cosmic-theme): reexport palette from cosmic-theme

* fix(cosmic-config-derive): allow use with reexported cosmic-config

* feat: update iced with fix and refactor applet env vars

* update iced
2023-05-30 12:03:15 -04:00
Michael Aaron Murphy
eb519782ac improv(segmented-button): extra padding for close icon 2023-02-14 14:56:29 -07: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
843919e44f feat(segmented-button): configurable font size 2023-01-30 21:57:24 +01:00
Michael Aaron Murphy
e9766389c4
fix(segmented-button): hover style not being applied 2023-01-19 22:32:58 +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
Michael Aaron Murphy
c4bd0fa3d8 feat: Re-orderable positioning of items in segmented button
Calling `model.swap_position(key1, key2)` will swap the positions of
these two items in the model.
2023-01-10 20:49:49 +01:00
Michael Aaron Murphy
e598d2bea3 fix: Prevent focus of disabled items in segmented button 2023-01-10 20:49:49 +01:00
Michael Aaron Murphy
29c7444a30 feat: focusable segmented items in segmented button 2023-01-10 20:49:49 +01:00
Michael Aaron Murphy
8988b25b6a feat: MultiSelect support for segmented buttons 2023-01-10 20:49:49 +01:00
Michael Aaron Murphy
dd3ff2e622 feat(segmented-button): icon support with state ergonomics 2023-01-10 20:49:49 +01:00
Michael Aaron Murphy
357de5e9be
improv(segmented-button): Express vertical/horizontal variants as a state machine
It's difficult to make iterative developments when there's two
nearly-identical types that need to be kept synchronized to any change.
Rust gives us traits so we should use them instead of duplicating code.

This made it easier to make styling and layout improvements to both
instances of the segmented button.
2023-01-04 05:55:27 +01:00