Commit graph

122 commits

Author SHA1 Message Date
4e1080108c yoda: warning cleanup sweep (dead code + clippy --fix) (squashed)
Squash of 4 yoda commits:
- 84437e21 yoda: libcosmic-yoda dead-code purge (14->0 warnings)
- 999db0a4 yoda: cosmic-theme cleanup (4->0 warnings) — workspace at 0 warnings total
- 4743bb8e yoda: cargo clippy --fix on libcosmic-yoda (115->33 warnings)
- 675f3b59 chore: reduce local stack warnings
2026-07-02 18:35:50 +02:00
7c0b3ff1b7 feat(cosmic-theme): add apply_gtk_decoration_layout helper
Writes the gtk-decoration-layout key to ~/.config/gtk-{3,4}.0/settings.ini
and best-effort updates GNOME's button-layout GSettings key for apps that
still consult it. Factors out write_gtk_settings_key for reuse.

Leyoda 2026 – GPLv3
2026-07-02 18:35:00 +02:00
Ashley Wulber
be499d01af fix: test 2026-07-01 15:10:28 -04:00
Ashley Wulber
9855d8b6fd fix(theme-gen): typo, use overlay colors 2026-07-01 15:10:28 -04:00
Ashley Wulber
217b4abe99 fix: guess offset 2026-07-01 15:10:28 -04:00
Ashley Wulber
0c336d77e4 chore(theme): helpers for alpha map 2026-07-01 15:10:28 -04:00
Ashley Wulber
991a8f2c78 feat: configurable blur alpha 2026-07-01 15:10:28 -04:00
Ashley Wulber
f268bb86cf fix: allow loading v1 themes
fallback to default value for missing attributes
2026-07-01 15:10:28 -04:00
Ashley Wulber
bd56f82ca0 fix(theme): color serialization 2026-07-01 15:10:28 -04:00
Ashley Wulber
5fca59df70 update blur alpha 2026-07-01 15:10:28 -04:00
Ashley Wulber
0ee5131670 fix: increase text contrast constraints for transparent surfaces 2026-07-01 15:10:28 -04:00
Ashley Wulber
19142fd38e refactor opaque fallback 2026-07-01 15:10:28 -04:00
Ashley Wulber
d0b164d216 feat(blur): better align with designs and remove transparency from theme when not on wayland 2026-07-01 15:10:28 -04:00
Ashley Wulber
439109db04 wip: blurred transparency 2026-07-01 15:10:28 -04:00
Ashley Wulber
9395a23a0b chore: update qt light default kcolorscheme
this was likely off by one because of a rounding change from v1
2026-07-01 15:10:28 -04:00
Ashley Wulber
7ac8f74825 chore: update ron files 2026-07-01 15:10:28 -04:00
Ashley Wulber
72ddeaa5fb feat: hex_color serialization for the theme
can also can deserialize the previous version of the theme, so existing themes should not be affected
2026-07-01 15:10:28 -04:00
Vukašin Vojinović
9c2a86a8f4 chore: add rustfmt config 2026-05-04 11:55:17 -04:00
Vukašin Vojinović
9abc4d483b chore: update dependencies 2026-05-04 11:55:17 -04:00
Vukašin Vojinović
34326b3925 chore(cosmic-theme): move Roundness to libcosmic 2026-05-04 11:55:17 -04:00
Vukašin Vojinović
564ef834ce improv(theme): list_button style
This adds a new `list_button` field to theme, which makes ListItem buttons stay transparent when pressed. It's essentially a mix of `text_button` and `background.component`, without hover highlights (as per designs).
2026-04-28 13:59:25 +02:00
Adil Hanney
c33455e9ad test: use default dark theme, not real system theme 2026-04-01 23:23:37 +02:00
Adil Hanney
9a72fe6c2d fix: complementary should be dark not light 2026-04-01 23:23:37 +02:00
Adil Hanney
39e8300d90 test: snapshots of kcolorscheme and qpalette
AI disclosure: I asked GitHub Copilot (Claude Haiku 4.5) "What's the best way to add tests for my recently merged qt theming contributions?" It suggested the insta crate for golden testing the output strings as well as some unit tests. I implemented it myself.
2026-04-01 23:23:37 +02:00
Adil Hanney
f734ccbbde test: fix expected color value 2026-04-01 23:23:37 +02:00
Adil Hanney
e86304cf3f ref: use assert_eq not assert
This way, the test log can show the expected and actual result if it fails.

thread 'steps::tests::test_conversion_fallback_colors' (61338) panicked at cosmic-theme/src/steps.rs:213:9:
assertion `left == right` failed
  left: 102
 right: 103
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
2026-04-01 23:23:37 +02:00
Adil Hanney
672f9047a2 test: use almost::zero instead of almost::equal as per documentation
"Do not use this to compare a value with a constant zero. Instead, for this you should use almost::zero."
2026-04-01 23:23:37 +02:00
Adil Hanney
f06d15ae35
feat(cosmic-theme): produce QPalette ini for more compatibility 2026-03-31 17:02:52 +02:00
Ashley Wulber
adb3e341fc fix(theme): bright colors for success, warn, destructive 2026-03-25 19:04:30 +01:00
Vukašin Vojinović
54bcb9ec12
chore: update dependencies and examples 2026-03-18 15:54:07 +01:00
Michael Aaron Murphy
85c27a9960
fix(cosmic-theme): on reset of theme exports, do not remove VS code configs
Closes #1139
2026-03-03 21:18:45 +01:00
Adil Hanney
754b064bff tweak(cosmic-theme): pretty write ini 2026-02-18 14:19:50 -07:00
Adil Hanney
3ed5c173fd fix(cosmic-theme): copy for backup, not rename
We're now merging the colors with kdeglobals, not replacing it with a symlink. So renaming the file gives us a missing file Io error:
 [2026-02-18T20:03:08Z ERROR cosmic_settings_daemon::theme] Failed to apply COSMIC theme exports. Io(Os { code: 2, kind: NotFound, message: "No such file or directory" })
2026-02-18 22:03:57 +01:00
Adil Hanney
dc3c194f09
fix(cosmic-theme): inverted Qt link_button colors 2026-02-18 21:02:58 +01:00
Michael Aaron Murphy
e1dad541b2
chore(cosmic-theme): Theme::apply_exports should not apply VS Code theme currently 2026-02-18 15:00:41 +01:00
Michael Aaron Murphy
7c49a736ec
refactor(cosmic-theme): remove Theme::apply_exports_static
Recently-added method is redundant with `apply_exports`, and the dark
mode preference is already defined in the theme being applied.
2026-02-18 14:24:19 +01:00
Michael Aaron Murphy
be98b7dd6f
refactor(cosmic-theme): remove recently-added Theme::get_active_with_brightness
The added method was not necessary. Also improves the code in the get_active method.
2026-02-18 14:18:27 +01:00
Vukašin Vojinović
cb288070af chore: cargo fmt 2026-02-17 21:18:55 +01:00
Adil Hanney
a2e903ad94
feat(cosmic-theme): add color schemes for qt apps 2026-02-17 17:39:37 +01:00
Vukašin Vojinović
cf19ac665f chore: update dependencies 2026-01-27 18:07:35 -07:00
Michael Aaron Murphy
03c440b97a
chore(cargo): update all crate dependencies 2026-01-14 18:46:53 +01:00
Cheong Lau
bd438a8581 perf: reduce memory allocations
This also changes `widget::column::with_children` and
`widget::row::with_children` to take an `impl IntoIterator` instead
of a `Vec`, like the `iced` variants of these functions do.

This shouldn't be a breaking change since passing in a `Vec` will still
compile and function exactly as before.

(Using `iced::widget::Column::from_vec` or
`iced::widget::Row::from_vec` isn't possible, since the elements of the
`Vec` aren't checked, so the size of the resulting `Column` or `Row`
won't adapt to the size of its children. Perhaps a new function could
be added to mirror `iced`'s?)
2025-10-22 04:30:57 +02:00
Cheong Lau
a27bb5e05d chore: apply clippy suggestions 2025-10-05 04:40:51 +02:00
Vukašin Vojinović
ea349aca82 chore: use std::syncLazyLock
Also migrates workspace members to Rust 2024.
2025-09-03 21:54:46 +02:00
Vukašin Vojinović
b72b15d719 chore: update dependencies 2025-09-03 21:54:46 +02:00
Ashley Wulber
364c0b9381 refactor(theme): .65 opacity for disabled button text 2025-08-26 15:22:22 -06:00
Ashley Wulber
94ee4e1915 theme: fix disabled button 2025-08-26 13:18:23 -06:00
Ashley Wulber
ba2f4b193a fix(theme): control tint colors need to be reversed for light theme 2025-08-20 17:32:49 +02:00
Ashley Wulber
05874e8ea2 fix: theme updates 2025-07-29 16:18:50 -04:00
Ashley Wulber
8c4cb2e54f chore: theme color updates 2025-07-21 22:59:30 +02:00