Commit graph

539 commits

Author SHA1 Message Date
Ian Douglas Scott
5c5460e93c WIP: config: Type safe API prototype
If we represent settings with types, we can provide an api to
get/set/monitor settings that guarantees we can only access settings
that exist with the right types, without seperate getter/setter/callback
functions like GTK would use.
2023-07-05 16:45:16 -07:00
Ian Douglas Scott
456b2ddcd5
config: Ignore some filesystem events (#125)
APIs like inotify can provide notification for some events that don't
change the contents of a file. It makes sense to ignore those here, even
if the expected way to write is through the config API.

This reduces the number of events on the directory received by a single
`:w` in vim from 12 to 8. And reduces a `touch` from 2 events to 1.

Atomic writes through the config API only result in 1 event per-setting,
before and after this change.
2023-07-03 14:33:25 -07:00
Ashley Wulber
b5a5e01de4 update iced 2023-06-27 13:05:57 -04:00
Michael Aaron Murphy
1562a80245 chore(iced): configurable natural scrolling 2023-06-26 14:01:31 -04:00
Michael Aaron Murphy
b0db23a169 perf(flexrow): provide reusable vec for storing elements 2023-06-26 17:00:50 +02:00
Michael Aaron Murphy
e3f30a1b5c feat(widget): add FlexRow widget 2023-06-24 12:30:52 +02:00
Ashley Wulber
42d7baf0d5 update iced: fixes scaling and autosize surface size issues 2023-06-21 17:45:21 -04:00
Ashley Wulber
ce685b5aeb fix(iced): always draw new surfaces 2023-06-16 12:35:20 -04:00
Ashley Wulber
944e77405f update iced 2023-06-15 19:39:45 -04:00
Ashley Wulber
bf456a08ee feat: animated togglers in the cosmic_sctk example 2023-06-15 20:38:16 +02:00
Ashley Wulber
78a3a1f29a fix CI 2023-06-15 20:38:16 +02:00
Ashley Wulber
850968715c udpate iced to use latest rebase 2023-06-15 20:38:16 +02:00
Victoria Brekenfeld
804b183492
chore: Update submodule (#115) 2023-06-13 19:11:19 +02:00
Ashley Wulber
a8a2e4ad26 feat: theme helper methods 2023-06-12 12:16:31 -04:00
Ashley Wulber
6699aa4756 fix: derive PartialEq for Theme 2023-06-09 18:13:30 -04:00
Ashley Wulber
31d7c75098 fix: update iced to fix Id reuse 2023-06-06 15:04:51 -04:00
Victoria Brekenfeld
cf2818c4a1
cosmic-config: Don't pull all of iced (#111) 2023-06-02 14:52:40 +02:00
Brock
5765053ad7
Expose internal iced crates for cosmic-time (#110)
This allows cosmic-time to use all imports via libcosmic, so the
versions of iced will not collide.
2023-06-01 16:12:57 -06:00
Ashley Wulber
ce713d9da7 refactor: move applet helpers to cosmic-applets repo 2023-05-31 10:33:46 -04:00
Michael Aaron Murphy
31f7e97d5b fix: incorrect font weights, sizes, line heights 2023-05-31 00:08:56 +02:00
Ashley Wulber
f06a81ccf9 chore: update deps 2023-05-30 14:39:22 -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
a173794bed chore: use tagged version of iced 2023-05-30 10:54:05 -04:00
Ian Douglas Scott
98ec1bbd48
Add a Popover widget, that shows a widget in an overlay (#100)
This serves a similar purpose to `GtkPopover`. It takes two widgets, one
to show normally and one to show in an overlay.

This should basically work, though more options could be added here.
2023-05-11 13:29:05 -07:00
Ian Douglas Scott
355e5a9715
config: Add calloop feature to provide a calloop source (#102)
This should be useful for integrating cosmic-config into things using
calloop, like cosmic-comp.
2023-05-09 08:45:21 -07:00
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
Ian Douglas Scott
c878e24465 Fix build on Windows/non-Unix
We'll need libcosmic to work on Windows and macOS if we want to use it
in the Keyboard Configurator.

`freedesktop-icons` doesn't seem to build on Windows, so only use it
on Unix systems. It does seem to build on macOS, so leave it as a
dependency there. A good solution for icon bundling on macOS/Windows will
need to be figured out at some point.
2023-04-25 06:20:20 -06:00
Ashley Wulber
93ec06a34d update iced: drag fixes 2023-04-07 21:36:40 -04:00
Ashley Wulber
72a0999b2e update iced: dnd source helper 2023-04-07 13:57:46 -04:00
Ashley Wulber
e5d263b23f fix: window configured sizes fix 2023-04-05 17:18:43 -04:00
Ashley Wulber
c466790903 update sctk 2023-04-05 11:20:18 -04:00
Ashley Wulber
2a5d4c3467 update iced: includes DnD support for iced-sctk 2023-04-04 18:15:41 -04:00
Jeremy Soller
035ec88c1b
Update iced 2023-03-24 09:57:57 -06:00
Jeremy Soller
f0ab457393
Update iced 2023-03-24 08:03:45 -06:00
Jeremy Soller
24709e9c3b Update iced 2023-03-17 18:46:06 -06:00
Jeremy Soller
e3ec7e3b7d WIP: Config API 2023-03-10 09:39:33 -07:00
Carl Richell
7b367daf38
Update README.md 2023-03-06 15:55:33 -07:00
Ashley Wulber
b510b89b98 fix(entry): entry bg alpha typo & border radius fixes 2023-03-03 11:28:32 -05:00
Carl Richell
ff78cfe1ca
Update README.md 2023-03-02 11:46:25 -07:00
Ian Douglas Scott
172d8ae511
Update iced and sctk (#87) 2023-03-02 08:40:51 -08:00
Ashley Wulber
b35af255b4 refactor(container): make layer optional and export as container 2023-02-28 12:26:38 -07:00
Ashley Wulber
8d968f931d fix: use master branch for theme 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
3245ff1b0e fix: applet & cosmic-sctk example 2023-02-28 12:26:38 -07:00
Ashley Wulber
e279566481 fix(button): button link text should be accent color 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
cbb21932d8 feat(theme): use cosmic-theme 2023-02-28 12:26:38 -07:00
Ashley Wulber
becdbb6eb3 wip: use CosmicContainer 2023-02-28 12:26:38 -07:00
Ashley Wulber
b0d6c29ab1 cleanup 2023-02-28 12:26:38 -07:00
Ashley Wulber
a7097dfb13 fix(theme): applets 2023-02-28 12:26:38 -07:00