Commit graph

2023 commits

Author SHA1 Message Date
173d6ebd32 Merge remote-tracking branch 'upstream/master'
# Conflicts:
#	iced
2026-08-27 07:49:01 +02:00
Eric Le Bihan
caec74c255 fix(menu example): fix key binds not being dispatched
The menu example advertised key binds (Ctrl+W / Ctrl+Shift+N) that were
never dispatched.

So add a subscription to take them into account.
2026-08-25 21:17:21 +02:00
Eric Le Bihan
3b62210d27 fix(menu): request redraw when menu bar opens
When using a menu bar without Wayland popup support, the menu items are
unclickable, as redrawing is never requested.

So, request a redraw after opening so the overlay menu is created and
drawn immediately.
2026-08-25 21:17:21 +02:00
Michael Aaron Murphy
2a73fbc0ed fix(segmented_button): request redraw on tab focus shift 2026-08-25 16:46:23 +02:00
Ashley Wulber
f8f5c7b5a6
feat: popover top position (#1403) 2026-08-25 02:28:46 +02:00
Jeremy Soller
ef490df50b
Revert "feat(cosmic-config): add new_data method." (#1399)
It was found that dirs::data_dir conflicts with dirs::config_dir on
macOS and Windows.

This reverts commit 631c81b170 from
https://github.com/pop-os/libcosmic/pull/1172

- [x] I have disclosed use of any AI generated code in my commit
messages.
- If you are using an LLM, and do not fully understand the changes it is
making to the code base, do not create a PR.
- In our experience, AI generated code often results in overly complex
code that lacks enough context for a proper fix or feature inclusion.
This results in considerably longer code reviews. Due to this, AI
authored or partially authored PRs may be closed without comment.
- [x] I understand these changes in full and will be able to respond to
review comments.
- [x] My change is accurately described in the commit message.
- [x] My contribution is tested and working as described.
- [x] I have read the [Developer Certificate of
Origin](https://developercertificate.org/) and certify my contribution
under its conditions.
2026-08-21 09:07:12 -06:00
Jeremy Soller
fd34b923f7 Revert "feat(cosmic-config): add new_data method."
It was found that dirs::data_dir conflicts with dirs::config_dir on
macOS and Windows.

This reverts commit 631c81b170.
2026-08-21 08:56:00 -06:00
Michael Aaron Murphy
2ab0d4c570
fix(iced): allow scrolling when children capture touch presses 2026-08-20 21:40:09 +02:00
Jeremy Soller
b812c77438
On platforms without state_dir, fall back to ~/.local/state (#1398)
This works around issues with state config on macOS and Windows, where
there is no defined application state directory

---

- [x] I have disclosed use of any AI generated code in my commit
messages.
- If you are using an LLM, and do not fully understand the changes it is
making to the code base, do not create a PR.
- In our experience, AI generated code often results in overly complex
code that lacks enough context for a proper fix or feature inclusion.
This results in considerably longer code reviews. Due to this, AI
authored or partially authored PRs may be closed without comment.
- [x] I understand these changes in full and will be able to respond to
review comments.
- [x] My change is accurately described in the commit message.
- [x] My contribution is tested and working as described.
- [x] I have read the [Developer Certificate of
Origin](https://developercertificate.org/) and certify my contribution
under its conditions.
2026-08-20 09:13:20 -06:00
Jeremy Soller
637c454af8 On platforms without state_dir, fall back to ~/.local/state 2026-08-20 09:06:44 -06:00
Alex Klepov
3a8ebf9197
fix(menu): panic when right-clicking a submenu 2026-08-20 00:18:04 +02:00
9535ada4d0 Merge upstream/master (COSMIC 1.6) into main
Aligne le fork sur epoch-1.6.0 (63 commits amont) en preservant les 19
commits yoda.

Resolutions notables :
- les cfg `all(feature = "wayland", target_os = "linux")` deviennent
  l alias `wayland_platform` introduit en amont ; il exclut winit comme
  le faisait le patch yoda 45eaaf16, l intention est donc preservee ;
- les features iced `cctk` ont ete renommees `wayland` en amont, la
  feature `wayland` locale est adaptee ; `winit` reste un marqueur vide
  et `iced/winit` est liste explicitement ;
- cctk/ashpd gardent leurs chemins locaux dans la section conditionnelle
  unix introduite en amont ;
- la garde anti-crash c0b653f5 (context_menu non assigne) est conservee
  par-dessus la nouvelle structure amont ;
- traductions ca/oc restaurees depuis amont.

Le submodule iced suit (merge + correctif du cfg cctk residuel).

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-19 21:55:00 +02:00
5392d9d5ae segmented_button: honour WindowControlsPosition for the tab close button
The close button of closable tabs was pinned to the trailing edge, so
enabling macOS-style window controls left the window buttons on the
left and the tab crosses on the right.

Read crate::config::window_controls_position() and, when Start, place
the close button before the tab contents and shift them accordingly.
The hit-test, the text width and the drawn icon all derive from the
same position so they stay in sync.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-19 21:18:31 +02:00
Hojjat
a5267e623f fix: request redraw on hover state change in dropdown widget
This also add a missing request when dropdown opens
2026-08-19 14:31:31 +02:00
Paul
75e9ee7e65 fix: request redraw on dropdown open/close in the in-window overlay path
`Dropdown::new` (the plain constructor used by any non-applet consumer) leaves `window_id`/`on_surface_action` unset, which routes the widget's `overlay()` impl to the in-window overlay path rather than the surface-action-based popup path. On that path, `update()`'s `open` closure and its close counterparts only ever requested a redraw inside the `#[cfg(wayland_platform)] if let Some(...)` block gated on those fields being set — so for the common case, opening or closing a dropdown flipped `is_open` with no redraw requested at all. The stale frame stuck around until some unrelated later event (e.g. cursor motion landing on the now-open/closed menu's bounds) forced a repaint,
making the menu appear to not open until the mouse moved, and not close until the same thing happened again on the way out.

Add an unconditional `shell.request_redraw()` at each of the three `is_open` transitions that don't already publish a Message of their own (an actual option selection already triggers a normal Message-driven redraw through the app's own update cycle, so that path needed no change):

- `open`: right after `is_open` is set true, ahead of the wayland-only surface-action block.
- the `close_operation` branch of the open/close operation state machine (`Id`-based programmatic close).
- the click-outside-closes-it branch of the mouse/touch press handler.

Fixes #1395
2026-08-19 14:31:31 +02:00
Michael Murphy
c1897c01aa
i18n: translation update from Hosted Weblate (#1379) 2026-08-18 14:05:23 +02:00
Hojjat
1f8d878694 fix: request redraw when hover state changes in toggle widget 2026-08-10 21:56:23 +02:00
Hojjat
0633751633 fix: request redraw if pressed state changes in button widget 2026-08-10 21:56:23 +02:00
Hojjat
5da2e94337 fix: request redraw when menu item hover state changes 2026-08-10 21:56:23 +02:00
Hojjat
633e6ab83f fix: request redraw if hovered state changes in segmented_button 2026-08-10 18:22:08 +02:00
Hojjat
030a7dbe02 fix: request redraw in selectable text and context menu 2026-08-09 06:09:28 +02:00
Ashley Wulber
8a017a15ee fix: window id handling for multi-window 2026-08-07 20:20:54 +02:00
Ashley Wulber
324ef6e905 chore: update selectable text menu corner radius 2026-08-07 20:20:54 +02:00
Ashley Wulber
b0b9bf16f4 fix: multi-window example headerbar
the headerbar is transparent, but a wrapping container applies the right color
2026-08-07 20:20:54 +02:00
Ashley Wulber
03a66751ea chore: feature gates 2026-08-07 20:20:54 +02:00
Hojjat
654ae0bf5d chore: add typography presets for selectable_text 2026-08-07 20:20:54 +02:00
Hojjat
8a03f063c0 refactor: rename to SelectableText instead of Text
This avoids API breakage
2026-08-07 20:20:54 +02:00
Hojjat
1de6ce9460 fix: dismiss the pop up on click outside or esc 2026-08-07 20:20:54 +02:00
Hojjat
8b31e83d58 fix(test): --features applet only
fix(test): `--feature wayland` only
2026-08-07 20:20:54 +02:00
Hojjat
a70feab2bf feat: integrate text context menu popups into Cosmic framework view system 2026-08-07 20:20:54 +02:00
Hojjat
d751855c74 feat: add Wayland popup context menu to TextInput 2026-08-07 20:20:54 +02:00
Hojjat
c6cf3db29d feat: add text context menu (overlay and wayland popup) 2026-08-07 20:20:54 +02:00
Hojjat
2cd43a8b89 feat: add context menu wrapper for TextEditor 2026-08-07 20:20:54 +02:00
Hojjat
834cd366ee feat: add context menu support to selectable Text widget 2026-08-07 20:20:54 +02:00
Hojjat
43a50cb6f5 chore: Update iced 2026-08-05 16:02:04 -04:00
Hojjat
1421337831 fix: do not publish ResponsiveMenuBar messages in a loop 2026-08-05 16:02:04 -04:00
Hojjat
31ec448bf0 fix: request redraw in text input when needed 2026-08-05 16:02:04 -04:00
Hojjat
5fd1ca4220 fix: request redraw in menus 2026-08-05 16:02:04 -04:00
Hojjat
1ac21a9d99 fix: request redraw when hover state changes 2026-08-05 16:02:04 -04:00
Hosted Weblate
05be504174
i18n: translation updates from weblate
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Martin Meizoso <martinmeizoso@gmail.com>
Co-authored-by: Quentin PAGÈS <quentinantonin@free.fr>
Translate-URL: https://hosted.weblate.org/projects/pop-os/libcosmic/gl/
Translate-URL: https://hosted.weblate.org/projects/pop-os/libcosmic/oc/
Translation: Pop OS/libcosmic
2026-08-05 17:02:15 +02:00
Ashley Wulber
dc1cf9f00c chore: update iced 2026-07-29 20:28:18 +02:00
Ashley Wulber
abaa06f10f fix(menu): path highlight corners flipped 2026-07-29 12:46:09 -04:00
Jeremy Soller
d71c25879e
i18n: translation update from Hosted Weblate (#1329)
Translations update from [Hosted Weblate](https://hosted.weblate.org)
for [Pop
OS/libcosmic](https://hosted.weblate.org/projects/pop-os/libcosmic/).



Current translation status:

![Weblate translation
status](https://hosted.weblate.org/widget/pop-os/libcosmic/matrix-auto.svg)
2026-07-29 09:13:39 -06:00
vacenty
0ca1b784c9 feat: Add option for frozen glass in maximized windows 2026-07-28 11:02:31 -04:00
Aadil
1f6dc991ea
fix(slider): adjust handle bounds and size for iced widget slider update 2026-07-27 14:16:25 +02:00
Michael Aaron Murphy
bdb273389d
chore: update iced with slider handle improvements 2026-07-27 14:11:20 +02:00
28f7ab4651 fix(segmented_button): crash when enumerating context menu buttons
Cherry-pick of upstream fix (pop-os/libcosmic#1354).

The .enumerate().find_map() pattern counted ALL items (buttons +
dividers) but the resulting index was used to access a children
array containing only button entries. When a divider preceded the
target button (e.g. trash in nav bar), the index was off-by-N,
causing an out-of-bounds panic and crashing cosmic-files.

Fix: filter_map first to keep only buttons, then enumerate.
2026-07-25 22:20:01 +02:00
Hojjat
7e777077b8 fix: gate frosted transparency on auto_blur 2026-07-24 11:52:07 +02:00
Hosted Weblate
c994f94ea9
i18n: translation updates from weblate
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Isaac Subirana <isaacsubiranac@gmail.com>
Co-authored-by: Nara Díaz Viñolas <nara.diaz.vinolas@gmail.com>
Co-authored-by: Prasanta-Hembram <Prasantahembram720@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/pop-os/libcosmic/ca/
Translation: Pop OS/libcosmic
2026-07-23 18:51:12 +02:00
Michael Aaron Murphy
ef162b8e16
feat(icon): add opacity method 2026-07-19 04:48:42 +02:00