Commit graph

99 commits

Author SHA1 Message Date
Ashley Wulber
9f213013dc fix: if not in bounds, return default mouse interaction 2026-03-17 15:18:09 -04:00
Ashley Wulber
1970499459 fix: capture mouse motion and mouse interactions in overlay 2026-03-05 22:02:40 +01:00
Ashley Wulber
e8d53b14ea chore: various fixes and some cleanup 2026-03-04 12:04:32 -05:00
Ashley Wulber
e10459fb37 wip rebase updates 2026-03-04 12:04:32 -05:00
Alex Marín
384e8f6e21
fix(segmented_button): clear bold button text on context menu close 2026-02-20 12:06:45 +01:00
Hojjat Abdollahi
b9bd773940
feat: ellipsize text (#1132) 2026-02-19 10:06:45 -07:00
mariinkys
c1c09624bd fix: right-clicking any sidebar item makes all sidebar items bold 2026-02-19 16:43:56 +01:00
Ashley Wulber
fdcba7d8ec fix(segmented_button): dnd hover 2026-01-29 00:07:00 +01:00
Ashley Wulber
9fcd449611 fix(segmented_button): hover state handling
when hover state changes, paragraphs also need to be updated. I'll make a not to check this again after the rebase though.
2026-01-27 14:10:04 -05:00
Ashley Wulber
927035809f refactor(segmented button): only clear tab drag after source event cancel or finish 2026-01-24 00:53:30 +01:00
Ashley Wulber
beddbf1770 improv(segmented_button): dnd state handling 2026-01-22 10:26:58 -05:00
Ashley Wulber
d71c42102d fix(segmented button): tab dnd 2026-01-22 02:11:08 +01:00
Michael Aaron Murphy
cdf4eafc9e
fix(segmented_button): set icon to symbolic 2025-12-05 17:18:26 +01:00
Stephan Buys
7f321cb0a3 segmented button: support tab drag + drop 2025-11-20 22:33:13 +01:00
Cheong Lau
1d6a43486e remove redundant clones, use mul_add on f32s 2025-10-22 04:30:57 +02: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
Ashley Wulber
2e87bd7c41 fix(segmented_button): ensure modifier state exact match for tab 2025-10-21 19:29:48 +02:00
Cheong Lau
a27bb5e05d chore: apply clippy suggestions 2025-10-05 04:40:51 +02:00
Michael Aaron Murphy
6e7a634398
fix(segmented_button): draw all indent levels 2025-08-19 16:31:19 +02:00
Michael Aaron Murphy
c10695600b
feat(segmented_button): add FileNav style with related widget improvements 2025-08-19 11:13:28 +02:00
Michael Aaron Murphy
95ebabf149
improv(segmented_button): hide focus state until tabbed 2025-08-13 12:20:22 +02:00
Michael Aaron Murphy
5434dc95d5
feat(segmented_button): pressed state style 2025-08-13 12:13:05 +02:00
Michael Aaron Murphy
4f423349a2
fix(segmented_button): duplicate focus fix 2025-08-13 11:18:58 +02:00
Michael Aaron Murphy
8badf73383
improv(segmented_button): nav bar, tab, and segmented control theme improvements 2025-08-12 17:52:59 +02:00
Ashley Wulber
5be9611c8a fix(segmented-button): context menu state management 2025-06-19 08:02:54 -06:00
Michael Aaron Murphy
3f4a50ee2c
chore: remove eprintln logs 2025-06-11 11:49:32 +02:00
Michael Aaron Murphy
f835afa59c
fix(segmented_button): unfocus when clicking out of bounds 2025-06-11 09:26:18 +02:00
Ashley Wulber
92ec78ba29
feat: menu bar popups 2025-06-10 18:22:07 +02:00
Ashley Wulber
ce56237ab9 fix(dnd): leave event handlers should expect None as the drag Id 2025-05-22 17:18:56 +02:00
Michael Aaron Murphy
c955c8400f
fix(segmented_button): fix widget focus not being applied on click 2025-03-24 04:36:53 +01: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
2afa192573
fix: Rust 2024 errors 2025-03-21 13:20:45 +01:00
Ashley Wulber
337b80d4ca
feat: Tooltips and Better Surface Management 2025-03-14 16:56:21 +01:00
ellieplayswow
a234a45ea6
fix(segmented_button): ignore button release / finger lifted events when dragged out of target 2025-03-10 16:21:34 +01:00
Jason Hansen
51ede4bce6
fix(segmented_button): close context menu when clicked outside 2025-01-01 00:37:04 +01:00
Ashley Wulber
0491c4baaa libcosmic updates 2024-10-18 14:04:39 -04:00
Jeremy Soller
dc97166f91
fix(segmented_button): diff the context menu 2024-10-14 11:21:40 -06:00
Michael Aaron Murphy
9f11239ea5
fix(segmented_button): update text on font changes 2024-10-10 18:52:18 +02:00
Michael Aaron Murphy
9e064e7fa0 feat: configurable fonts 2024-10-05 01:47:37 +02:00
Jeremy Soller
c497c227ce
fix(segmented_button): use correct divider color when vertical 2024-09-11 14:29:36 -06:00
Victoria Brekenfeld
b40839638a fix: Use globals instead of thread-locals
Better support for multi-threaded applications,
especially cosmic-comp rendering in parallel on
multiple threads, each potentially accessing
global configurations such as the active theme,
icon_theme and more...
2024-08-02 20:27:08 +02:00
Jeremy Soller
c9a2265ab1 Make text wrap configurable 2024-07-09 11:14:49 -06:00
Jason Hansen
41d1f4a7cd
feat(segmented_button): add on_middle_press 2024-07-02 02:53:45 +02:00
Jason Hansen
bfbff0773a
fix(button): Closing tab with middle-click
Only close on middle button release if the middle button press event was on the same tab.
2024-07-01 21:18:48 +02:00
Ashley Wulber
d2b3531984 fix: persist selected action on entity change 2024-06-12 14:54:45 -04:00
Ashley Wulber
98231fa99a fix: avoid completely clearing DnD state.
Motion sometimes will make the dnd miss a target entity, so instead we track that no entity is hovered for the ongoing DnD, instead of clearing the DnD state.
2024-06-12 13:06:04 -04:00
Ashley Wulber
173ddca60f fix: refactor dnd impl to support responsive widget 2024-05-31 19:14:58 -04:00
Michael Aaron Murphy
9ffb87d21f feat(context_menu): add a context menu widget as menu tree alternative to the popover widget 2024-04-22 17:25:05 +02:00
Michael Aaron Murphy
c0b653f506
fix(segmented-button): crash when context menu is unassigned 2024-04-19 11:20:20 +02:00
Michael Aaron Murphy
59a913c15d feat!(segmented_button): Add context menu support and integrations 2024-04-18 17:18:53 +02:00