Commit graph

57 commits

Author SHA1 Message Date
Ashley Wulber
0491c4baaa libcosmic updates 2024-10-18 14:04:39 -04:00
Michael Aaron Murphy
9e064e7fa0 feat: configurable fonts 2024-10-05 01:47:37 +02:00
Ashley Wulber
4bbb6c3cab fix: cosmic example 2024-05-15 16:19:32 -04:00
Ashley Wulber
61427b25b0 fix: fallback to Cosmic icon theme 2024-03-19 14:14:30 -06:00
Michael Aaron Murphy
c7093b67f6 chore(examples): fix build 2024-02-26 19:17:49 +01:00
Ashley Wulber
072a3d5ca0 feat: lower the opacity of colors used in the segmented button when disabled
This is needed for the new tiling applet. Transparent text only seems to be working with the wgpu feature at the moment
2024-02-12 11:55:27 +01:00
Ashley Wulber
dbcd927d4b various fixes 2024-02-06 11:28:27 -05:00
Ashley Wulber
994e93d6d2 fix: better handling of secure inputs 2024-01-17 14:57:06 -07:00
Ashley Wulber
481cd5a0cd fix: position of input label 2024-01-03 14:53:52 -05:00
Ashley Wulber
cd56266ac9 chore: update example 2024-01-02 15:09:29 +01:00
Ashley Wulber
fcfe9ebc59 chore: update iced 2023-12-04 17:53:24 -05:00
Ashley Wulber
9202383596 chore: update to 0.12 2023-12-04 17:53:24 -05:00
danieleades
8e99406a8b
chore: fixing linter warnings 2023-11-28 20:02:08 +01:00
Michael Aaron Murphy
ca7c17ce21 feat(widget): add dropdown widget as pick_list replacement
The Dropdown widget is based on the PickList widget from iced.
2023-10-24 19:45:21 +02:00
Ashley Wulber
7cc791a3f5
feat: add support for dark / light mode switching (#178)
* feat: add support for dark / light mode switching and simultaneouscustom light / dark mode themes

* refactor(color-picker): optional initial color and fallback color

* refactor: used FixedPortion for layout of the settings item

This makes sure that the control always has at least the specified portion of the available space

* refactor: make all members of the ThemeBuilder public

* refactor: add and update palette colors

* fix(theme): typo and derive PartialEq for ThemeBuilder

* fix: update color picker usage

* feat: add more variables to the theme

* fix: radius on headerbar

* fix: Theme CosmicConfigEntry impl

* chore: specify rev of taffy

* fix: theme CosmicConfigEntry missing variables

* fix: apply theme type when theme mode changes

* wip: add plus icon to empty color picker button

* chore: fix rev and imports

* refactor(color-picker): allow custom size for the icon

* refactor(color_picker): make color_button public

* update iced
2023-10-16 16:19:04 -04:00
Ashley Wulber
70077ca985 feat: color picker 2023-10-02 10:24:43 -04:00
Ashley Wulber
3829178c88 refactor: allow text input on_clear for more than just search_input 2023-09-21 15:25:13 -04:00
Michael Aaron Murphy
0eba498708 chore(examples): icon API update 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
6457481ae5 fix: text input layout & cargo fmt 2023-08-24 15:44:29 -04:00
Ashley Wulber
d35dfad486 fix: search input border style 2023-08-24 10:39:43 -04:00
Ashley Wulber
db8e791b87
Text input (#143)
* update: iced 0.10.0

* wip: text input

* wip: text inputs with icons and buttons

* wip: improve text input

* refactor: text input styling

* chore: add scale factor

* chore(text_input): add winit example and do some cleanup
2023-08-23 10:59:26 -04:00
Ashley Wulber
ff83f893ef refactor: updates for buttons and checkboxes 2023-08-14 12:31:16 -04:00
Ashley Wulber
6c57e04e36 refactor: introduce thread local THEME variable and distinguish between custom and system theme settings 2023-08-14 12:31:16 -04:00
Michael Murphy
a223b60a0c
feat!: implement Application API 2023-08-02 11:54:07 +02:00
Ashley Wulber
e24465ba37 update(example): add button to cards and update cosmic-time 2023-07-28 14:01:14 -07:00
Ashley Wulber
785861a630 example: update cosmic-time and add extra row to each card 2023-07-28 14:01:14 -07:00
Ashley Wulber
5745ed3ffe chore: examples of animated card usage 2023-07-28 14:01:14 -07:00
Ashley Wulber
598bfaa611 feat: icon default fallbacks 2023-07-07 16:58:21 -04: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
Ashley Wulber
b510b89b98 fix(entry): entry bg alpha typo & border radius fixes 2023-03-03 11:28:32 -05:00
Ashley Wulber
b35af255b4 refactor(container): make layer optional and export as container 2023-02-28 12:26:38 -07:00
Ashley Wulber
844aeba379 refactor(theme): make Theme Copy 2023-02-28 12:26:38 -07:00
Ashley Wulber
13aa5f88cb feat(theme): export cosmic-theme & add CosmicContainers to example 2023-02-28 12:26:38 -07:00
Ashley Wulber
becdbb6eb3 wip: use CosmicContainer 2023-02-28 12:26:38 -07:00
Ashley Wulber
d981eb4c4e wip(theme): remove palette 2023-02-28 12:26:38 -07:00
Michael Aaron Murphy
eb519782ac improv(segmented-button): extra padding for close icon 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
f386609414 feat(examples/cosmic): scaling factor spin button 2023-01-19 19:58:31 +01:00
Michael Aaron Murphy
4269fad768 feat(examples/cosmic): Show warning widget only when clicking on its button 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
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
29c7444a30 feat: focusable segmented items in segmented button 2023-01-10 20:49:49 +01:00
Michael Aaron Murphy
a89ec01297 chore: Add a few more multi-select examples in the demo 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
b1cbcfaf5b refactor: Replace nav bar macros with nav bar widget 2023-01-10 20:49:49 +01:00
Michael Aaron Murphy
7d018a2139 feat(settings): global setting for icon theme 2023-01-05 16:57:02 +01:00
Victoria Brekenfeld
75687acf2f chore: apply cargo fmt 2023-01-04 05:46:24 +01:00
Michael Aaron Murphy
444e389496 refactor!: separate horizontal and vertical segmented button widgets
- Removes the orientation enum in favor of two separate widgets
- Implements the spacing attribute for both widgets
- Demo is updated to display spaced variants of the widgets
2023-01-03 20:29:50 +01:00
Michael Aaron Murphy
0cea2023f8 refactor(cosmic): Separate states across views 2023-01-03 00:12:28 -05:00