Commit graph

1932 commits

Author SHA1 Message Date
261a211647 header_bar: add WindowControlsPosition (macOS-style left controls)
Adds a new public enum `WindowControlsPosition { Start, End }` and a
matching field on `HeaderBar`, allowing window controls (close / minimize
/ maximize) to be packed on the start side of the headerbar (macOS
style, icon order close → minimize → maximize) instead of the default
end side (Linux / GNOME style, minimize → maximize → close).

Wiring:
- `crate::widget::WindowControlsPosition` re-exported alongside
  `HeaderBar`.
- `HeaderBar::controls_position(Option<WindowControlsPosition>)` setter;
  when left unset, falls back to `crate::config::window_controls_position()`
  (reads `CosmicTk.window_controls_position`), mirroring how `density`
  falls back to `header_size()`.
- New `CosmicTk.window_controls_position` field with default `End` for
  backwards compatibility; serde-friendly enum so existing configs keep
  working via `#[serde(default)]` semantics.

Tested with cosmic-yoterm, cosmic-settings, cosmic-edit, cosmic-files
rebuilt against this libcosmic via a local `[patch]` override. Config
changes picked up live through the existing cosmic-config subscription.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-07-02 18:28:43 +02:00
b7c81907ba feat(segmented_button): on_double_click + internal tab reorder (squashed)
Squash of 2 yoda commits:
- 108441ef segmented_button: add on_double_click callback
- a322516f segmented_button: fix internal tab reorder end-to-end
2026-07-02 18:28:43 +02:00
6219084eb6 perf: throttle malloc_trim + avoid VecDeque clones (squashed)
Squash of 2 yoda commits:
- 77262dd0 perf(malloc): throttle malloc_trim to 1 Hz in hot paths
- 1d98eee6 perf(widget): avoid VecDeque clone in segmented_button/table Model::clear
2026-07-02 18:28:43 +02:00
Ashley Wulber
20dfd7c236 cleanup: corner radius menu path logic 2026-07-01 15:10:28 -04:00
Ashley Wulber
be499d01af fix: test 2026-07-01 15:10:28 -04:00
Ashley Wulber
bb0145c566 chore: add the rounded rectangle strip helper 2026-07-01 15:10:28 -04:00
Ashley Wulber
a365d45091 fix: menu folder corners 2026-07-01 15:10:28 -04:00
Ashley Wulber
cad4be9401 fix: live settings override auto blur 2026-07-01 15:10:28 -04:00
Ashley Wulber
822d3b2a0f chore: update cosmic-protocols 2026-07-01 15:10:28 -04:00
Ashley Wulber
46b25d4218 refactor: allow for transparent header 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
5ea8a86959 fix: card style 2026-07-01 15:10:28 -04:00
Ashley Wulber
e3a4e739e3 cleanup(segmented button): popup destruction on press 2026-07-01 15:10:28 -04:00
Ashley Wulber
46c717fd57 fix: corner radius setting match style 2026-07-01 15:10:28 -04:00
Ashley Wulber
94d2c18a23 chore: dialog default to overlay 2026-07-01 15:10:28 -04:00
Ashley Wulber
cde1989e78 refactor: popups for nav bar / segmented buttons 2026-07-01 15:10:28 -04:00
Ashley Wulber
f5fc392ba4 fix: opaque menu for overlay 2026-07-01 15:10:28 -04:00
Ashley Wulber
f04437cee5 chore: surface action for LiveSettings update 2026-07-01 15:10:28 -04:00
Ashley Wulber
e939d334f6 fix: on init, set blur value if theme is already marked transparent
useful for things like the files dialog
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
00067dc5b8 fix: set corners and blur before surface creation
these are then saved and applied on creation
2026-07-01 15:10:28 -04:00
Ashley Wulber
19f4a289e5 fix: config 2026-07-01 15:10:28 -04:00
Ashley Wulber
43de9e3e77 cleanup and update iced 2026-07-01 15:10:28 -04:00
Ashley Wulber
033dfe6c57 cleanup 2026-07-01 15:10:28 -04:00
Ashley Wulber
76954a6524 fix: tooltip corner radius 2026-07-01 15:10:28 -04:00
Ashley Wulber
4a7ed015f6 feat: padding setting on surface creation 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
8d2dbb3f23 fix feature gate 2026-07-01 15:10:28 -04:00
Ashley Wulber
ac4a1ab259 improv: allow overrides for corner radius or blur that apply on creation as well 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
58980231b9 refactor: allow opting out of auto corner radii tracking 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
90ac265ee0 chore: remove unnecessary bound 2026-07-01 15:10:28 -04:00
Ashley Wulber
40792f21de Revert "remove header container"
This reverts commit 8035ef9535fa87deb05d88594a6b6a412324c039.
2026-07-01 15:10:28 -04:00
Ashley Wulber
7d62b193f4 feat: improve handling of list items using data in theme 2026-07-01 15:10:28 -04:00
Ashley Wulber
408d37169a fix: feature gate 2026-07-01 15:10:28 -04:00
Ashley Wulber
5fca59df70 update blur alpha 2026-07-01 15:10:28 -04:00
Ashley Wulber
5938776c26 chore: surface task helper 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
fb4628e460 fix: winit feature gate 2026-07-01 15:10:28 -04:00
Ashley Wulber
1fafd57578 remove header container
i'm not sure what gaps it is referring to
2026-07-01 15:10:28 -04:00
Ashley Wulber
bf5ffcc2af fix: apply blur enabled to system theme 2026-07-01 15:10:28 -04:00
Ashley Wulber
2d7f66d528 refactor: remove extra opacity where it was added 2026-07-01 15:10:28 -04:00
Ashley Wulber
732785a50c track surfaces that use a normal view method 2026-07-01 15:10:28 -04:00
Ashley Wulber
cadb773377 wip refactor blur/corners 2026-07-01 15:10:28 -04:00
Ashley Wulber
9e77210740 fix: blur only after blur event 2026-07-01 15:10:28 -04:00
Ashley Wulber
cfd5220c1e wip: corner radius v2 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