Commit graph

22 commits

Author SHA1 Message Date
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
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ć
ec7a531539 chore: use with_alpha() where applicable 2025-07-21 10:52:22 -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
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
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
Ashley Wulber
cac3d0b5df chore(theme): set window.autoDetectColorScheme 2024-05-13 11:26:15 -04:00
Ashley Wulber
0ffe3f3a3e cargo fmt 2024-05-13 11:26:15 -04:00
Ashley Wulber
c1cfa024d6 feat: basic vscode theme export support 2024-05-13 11:26:15 -04:00
Ashley Wulber
1575aa267c fix(theme): add # to light / dark colors when writing gtk4 css variables 2024-03-19 23:56:37 +01:00
Ashley Wulber
1b62b9686c refactor(theme): use symlink for both gtk4 and gtk3 css and add method for reset 2024-03-18 14:49:40 -06:00
Ashley Wulber
e18e304e0f feat: add method for applying gtk color variables to their respective css files 2024-03-18 14:49:40 -06:00
Ashley Wulber
6696a170c5 cleanup: remove TODOS 2024-03-18 14:49:40 -06:00
Ashley Wulber
7ad48afcbd feat: export palette colors as named colors 2024-03-18 14:49:40 -06:00
Ashley Wulber
d6b87a0222 chore: update gtk4-output for the theme to set adwaita named colors
This is still a bit incomplete, and some apps use their own custom variables as well, for example the text editor.
2024-03-18 14:49:40 -06:00
Ashley Wulber
620c1adb74 wip: theme update & some cleanup 2023-08-14 12:31:16 -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