Commit graph

100 commits

Author SHA1 Message Date
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
Vukašin Vojinović
ec7a531539 chore: use with_alpha() where applicable 2025-07-21 10:52:22 -04:00
Ashley Wulber
7748e59ae6 refactor: better method of implementing tinted control colors 2025-07-17 17:04:04 -04:00
Ashley Wulber
0041fc2d12 Revert "refactor: introduce new palette colors for control tint"
This reverts commit b8f9dc6cb0.
2025-07-17 17:04:04 -04:00
Ashley Wulber
364af2bcdf refactor: introduce new palette colors for control tint
neutral colors will not be tinted anymore
2025-07-17 09:54:46 -04:00
Michael Aaron Murphy
8cf372c9b9
perf: inline public getters/setters, and use non-generic inner functions
To reduce compile-times and avoid some overhead to binary size, this will modify some of our
generic functions to use non-generic inner functions where possible. The inner functions are
marked carefully with `#[inline(never)]` to prevent being inlined by LLVM at their callsites

While looking for generic functions to optimize, I have also taken the opportunity to annotate
public non-generic getters and setters with `#[inline]` to ensure that LLVM will inline them
across crate boundaries. By default, only generic functions are automatically inlined, and
only when enabling fat LTO are constant functions reliably inlined across crate boundaries.
2025-03-21 13:31:34 +01:00
Michael Aaron Murphy
92b2756e26
chore: update dependencies; including ron 0.9 2025-03-21 13:20:45 +01:00
Ashley Wulber
508753ae69 feat: high contrast theme updates 2025-03-10 16:10:32 +01:00
Ashley Wulber
3f25af87a3 refactor: small widget container colors 2025-02-17 15:13:16 +01:00
Ashley Wulber
25bf8f60cc feat: improve accent_text for low contrast accent colors. 2025-02-17 15:13:16 +01:00
Victoria Brekenfeld
fdfd80f8b1 chore: Update ron to 0.9 2025-01-22 15:50:44 +01:00
Ashley Wulber
aeb87f8886 refactor: backup non-cosmic gtk css files 2024-12-13 15:34:31 -05:00
Vukašin Vojinović
478f3ead75 fix(palette): remove deprecated colors 2024-10-18 14:04:39 -04:00
Vukašin Vojinović
33c60ed87a fix(theme): update color palette 2024-10-18 14:04:39 -04:00
Vukašin Vojinović
8b37f658e2 fix(small_widget_divider): fix alpha value
This makes this color match the designs, and thus fixes the divider color in the horizontal `segmented_button`.
2024-10-08 17:09:26 -04:00
Vukašin Vojinović
e645dee2f0 fix(header_bar): increase compact height
Increases Compact header height to 40 (from 36), to better accommodate larger widgets (e.g. the search bar). This makes it distinct from the SSD header, which is now addressed by the `_` match case.
Also makes the horizontal header padding fixed at 8, so that the app window padding can also be 8.
2024-10-03 15:39:00 +02:00
Vukašin Vojinović
0a34660a80 fix: move density to cosmic_theme 2024-09-23 12:40:22 -04:00
Piotr
b15ae66ac8 fix: dont omit default preference for light theme 2024-08-26 04:14:35 +02:00
Ashley Wulber
cfa1adaf46 fix: return error if vscode config fails to parse, instead of overwriting 2024-07-17 19:48:34 +02:00
Ashley Wulber
80b7049584 Revert "Theme GTK3/4 window controls to match COSMIC theme (#464)"
This reverts commit 9f017de1fa.
2024-06-14 23:58:24 +02:00
nabrious0
9f017de1fa
Theme GTK3/4 window controls to match COSMIC theme (#464)
* Update gtk4_output.rs

* get headerbar border-radius from theme

---------

Co-authored-by: Ashley Wulber <48420062+wash2@users.noreply.github.com>
2024-05-28 09:49:10 -04:00
Ashley Wulber
8b0bb6a677 fix(theme): gtk3 css doesn't allow hex colors with alpha 2024-05-25 06:40:53 -06:00
Ashley Wulber
e302e9505c fix(theme): include alpha value in to_hex 2024-05-21 10:28:11 -04:00