Commit graph

51 commits

Author SHA1 Message Date
Michael Aaron Murphy
aa3f5d3401
improv: impl From<M> for Message<M> 2024-05-21 01:29:50 +02:00
Ashley Wulber
107eeb5f1f fix: shrink applet text 2024-05-17 20:58:56 +02:00
Michael Aaron Murphy
1355588723 improv(button): specialize button for cosmic, and apply alpha to header buttons 2024-05-17 20:58:38 +02:00
Ashley Wulber
54eb5487b4 fix(applet): remove text color style 2024-05-15 16:19:32 -04:00
Ashley Wulber
be329403c1 cleanup(applet): replace todo for text size 2024-05-15 16:19:32 -04:00
Ashley Wulber
9677b74b89 feat(applet): scale text based on panel setting 2024-05-15 16:19:32 -04:00
Ashley Wulber
9292004642 feat: allow preference for dark or light system theme
also converts applet to use preferred system theme
2024-05-14 07:36:08 -04:00
Ashley Wulber
23f6fc8358 fix(applet): set the svg style to default if the icon is not symbolic 2024-05-06 19:07:22 -04:00
Ryan Brue
fec71fdda4 feat(applet): impl ToString for PanelType 2024-05-06 15:29:35 -06:00
Ryan Brue
e9aa969e61 feat(applet): add panel type attribute to applet context
This will allow applets to know whether they are on a Panel, Dock, or other named panel.
2024-05-06 17:02:32 -04:00
Ashley Wulber
d54af65a2a refactor: update applet icon sizes 2024-04-15 18:29:57 -04:00
Ian Douglas Scott
61a14a953d
applet: Add icon_button_from_handle (#368)
`StatusNotifierItem` can use either named icons, or pixmap data. So to
support the latter, it needs a way to show a non-named icon with the
same button styling as any other planel applet icon.

The `StatusNotifierItem` protocol actually supports sending different
icons with different sizes, so ideally we'd want a `icon::Data` variant
that contains multiple sizes? But just using the largest and scaling
works for now.
2024-03-27 09:10:41 -07:00
Ashley Wulber
ef050d5b05 chore: update applet icon size and padding 2024-03-08 17:50:01 -05:00
Ashley Wulber
fda17c9d97 fix: update applet button type 2024-02-06 11:28:27 -05:00
Ashley Wulber
f4ad098647 wip: update to use latest iced 2024-02-06 11:28:27 -05:00
Ashley Wulber
06c33dcf06 refactor: optional config subscriptions using dbus 2024-01-02 15:12:14 +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
2b9e0c09ee fix: applet updates 2023-12-08 12:02:21 -05:00
Ashley Wulber
7d0ba4dba9 fix: applets feature 2023-12-04 17:53:24 -05:00
Ashley Wulber
ef5b6fb44a feat: add helpers for getting and using activation tokens in applets
refactor(applet): connect to privileged socket if available

cleanup
2023-11-17 19:29:11 -05:00
Ashley Wulber
405aaf134d fix(applet): set the theme to be the system preference if it is not light or dark 2023-11-13 12:15:15 +01:00
Ashley Wulber
33412998c7 refactor(applet): add padded control 2023-10-24 16:52:18 +02:00
Ashley Wulber
a2bda49152 refactor: add applet button variants and a menu_button helper 2023-10-19 15:10:32 -04:00
Ashley Wulber
589b661752 fix(applet): applet popups should have a 1px border 2023-10-19 10:21:38 -04:00
Ashley Wulber
9ddadd330f fix: applet button styles 2023-10-02 10:59:27 -04:00
Ashley Wulber
5454a01461 fix(applet): use text button style 2023-09-18 19:48:27 +02:00
Eduardo Flores
453cc6588e
fix(applet): styling improvements 2023-09-18 10:37:57 +02:00
Michael Aaron Murphy
8f7b400143
refactor(applet): move applet module to crate root 2023-09-18 07:45:11 +02:00
Ashley Wulber
ce713d9da7 refactor: move applet helpers to cosmic-applets repo 2023-05-31 10:33:46 -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
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
Ashley Wulber
3245ff1b0e fix: applet & cosmic-sctk example 2023-02-28 12:26:38 -07:00
Ashley Wulber
a7097dfb13 fix(theme): applets 2023-02-28 12:26:38 -07:00
Ashley Wulber
ccca0e5193 fix(applet): appearance 2023-02-28 12:26:38 -07:00
Ian Douglas Scott
2dde95ee42
Add _with_flags() variants to settings helpers (#85) 2023-02-20 14:26:31 -08:00
Ashley Wulber
dc4edb2a4d feat: applet button theme helper 2023-01-05 16:20:33 +01:00
Ashley Wulber
d31c686e9a fix: limits on popup size and shrink popup container 2022-12-27 21:20:06 +01:00
Ashley Wulber
5d271ae21b fix: applet feature 2022-12-27 18:11:38 +01:00
Ashley Wulber
5fb8b9d56f specify rev in cosmic-panel-config & re-export 2022-12-21 14:40:58 -07:00
13r0ck
c46207a993 CosmicAppletHelper: Add window size helper 2022-12-20 20:04:10 -07:00
Ashley Wulber
91e826d8ea feat: applet-window-settings 2022-12-08 19:02:29 +01:00
Ashley Wulber
5dbb050d48
fix: Updates & fixes the applets helpers 2022-12-07 19:39:11 +01:00
Ashley Wulber
0f857b18ea
fix: allow default popup positioner to be constrained 2022-12-05 16:54:22 -05:00
Ashley Wulber
a8c753d429
feat: transparent button style 2022-11-17 20:49:20 -05:00
Ashley Wulber
6f17328eb1
refactor: accept icon name, and style in icon_button 2022-11-17 16:45:09 -05:00
Ashley Wulber
33779b8652
wip: popup helpers 2022-11-15 23:11:48 +01:00
Ashley Wulber
c48fca40fe
fix: typo 2022-11-15 11:30:42 +01:00
Ashley Wulber
8d4e7e1cf1
refactor: accept size in popup helper and add offset 2022-11-15 11:22:27 +01:00
Ashley Wulber
9174e42099
fix: correctly align the container for popups 2022-11-14 16:58:04 +01:00
Ashley Wulber
00eed9c741
feat: popup container helper 2022-11-14 16:33:05 +01:00