Commit graph

44 commits

Author SHA1 Message Date
84437e219b yoda: libcosmic-yoda dead-code purge (14→0 warnings)
Real bug fixes:
- spin_button::vertical(): was constructing the SpinButton with
  Orientation::Horizontal — vertical() rendered horizontally. Fixed
  to use Orientation::Vertical, which also resolves the
  'Vertical never constructed' warning.
- text_input/input.rs: rewrite the iterator-skip logic for trailing
  icon layout. The previous `let mut icon_layout = ...; if has_start
  ... = ...; ... = ...;` triggered two value-never-read warnings and
  obscured the intent. Now it reads as 'skip text, optionally skip
  start-icon, then take the trailing-icon layout'.

Dead code removed:
- core::Core::portal_is_high_contrast — assigned at construction,
  never read anywhere
- widget::menu::menu_bar::bar_pressed field and the
  pub fn get_mut_or_default helper — no callers
- widget::popover::State — declared, never constructed
- widget::segmented_button::widget::Focus.now — sibling of updated_at,
  never read
- widget::wayland::tooltip::widget::Variant — orphan enum (and the
  cargo fix follow-up dropped a now-unused Element import)
- widget::button::widget::Button::is_hovered method — trivial getter
  with no callers; the underlying `is_hovered` field is still used

Visibility / nits:
- segmented_button::widget::TabDragSource: gain pub(super) so the
  pub(super) field tab_drag stops exposing a more private type
- widget::menu::flex::resolve: #[allow(dead_code)] (170-line public
  helper, kept for future use)
- app/cosmic.rs: drop one unreachable arm in the surface-message match
- widget::dropdown::multi: drop unused Paragraph import

Leyoda 2026 – GPLv3
2026-05-05 19:02:31 +02:00
cdf349385b yoda: cargo fix --lib (libcosmic-yoda) — drop 99 trivial warnings
Auto-applied suggestions on libcosmic-yoda lib only: unused imports,
unused-by-name params (prefixed with _), redundant mutability. From 113
warnings down to 14 (the 14 remaining are real signals: never-read
fields, unreachable patterns, etc., to be reviewed manually).

Leyoda 2026 – GPLv3
2026-05-05 16:27:29 +02:00
aec3eb615f yoda: ungate remaining winit+wayland combined cfgs
During Phase 3d it surfaced that several widgets keep a three-clause
cfg `#[cfg(all(feature = "winit", feature = "wayland", target_os = "linux"))]`
(e.g. dropdown::widget::with_popup, widget/mod.rs menu bits,
theme/style/mod.rs). Since the yoda fork is wayland-only the "winit"
clause is vestigial — dropping it unhides these methods for Wayland
consumers (cosmic-settings needs Dropdown::with_popup on the wallpaper
page).

Also fixed a cfg asymmetry in responsive_menu_bar.rs: the fallback
block was gated `cfg(not(all(winit, wayland, linux)))` while the
primary block was `cfg(all(wayland, linux))`. With winit removed both
blocks were active and we got E0308 expected-() — aligned the cfgs so
exactly one branch compiles.
2026-04-23 17:36:21 +02:00
Ashley Wulber
413e63f62a chore: update features and feature gates 2026-03-30 22:25:27 -04:00
Ashley Wulber
1970499459 fix: capture mouse motion and mouse interactions in overlay 2026-03-05 22:02:40 +01:00
Ashley Wulber
e10459fb37 wip rebase updates 2026-03-04 12:04:32 -05:00
Hojjat Abdollahi
b9bd773940
feat: ellipsize text (#1132) 2026-02-19 10:06:45 -07:00
Jonatan Pettersson
3e6c9a6add feat: add optional placeholder text to dropdown 2026-01-16 08:50:58 -07:00
Michael Aaron Murphy
639326fcc3 feat(icon): optimize & bundle icons with crabtime for non-unix platforms 2025-11-21 18:37:49 +01:00
Michael Aaron Murphy
fc85fcac3e fix(dropdown): refresh popup when selections change 2025-11-18 19:03:23 +01:00
Michael Aaron Murphy
7eecbe30d7 feat(dropdown): add Id support with custom close, open operations 2025-11-18 19:03:23 +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
Cheong Lau
a27bb5e05d chore: apply clippy suggestions 2025-10-05 04:40:51 +02:00
Ashley Wulber
92ec78ba29
feat: menu bar popups 2025-06-10 18:22:07 +02:00
Soso
a55ed23ba8
improv!(dropdown): accept impl Into<Cow<'_, str> (#881) 2025-05-26 22:53:35 +02:00
Ashley Wulber
cb682be3c8
fix(applet): fixes for recent updates 2025-03-21 17:23:46 +01:00
Michael Aaron Murphy
0aa518984e
chore: format for 2024 edition 2025-03-21 13:33:07 +01:00
Ashley Wulber
a3525ef56e refactor: track virtual offset in the layout 2025-03-21 03:45:30 +01:00
Ashley Wulber
337b80d4ca
feat: Tooltips and Better Surface Management 2025-03-14 16:56:21 +01:00
Vukašin Vojinović
58fc034459 fix(dropdown): styling 2024-12-25 04:42:24 +01:00
Michael Aaron Murphy
9a8a56952d
feat(dropdown): optional icons for dropdowns 2024-11-25 06:51:16 +01:00
Ashley Wulber
2ecef3c7b2 feat: better a11y support 2024-11-11 15:02:04 -07:00
Ashley Wulber
59407552b6 fix: apply translation to dropdown position 2024-10-22 16:11:46 -04:00
Ashley Wulber
0491c4baaa libcosmic updates 2024-10-18 14:04:39 -04:00
Michael Aaron Murphy
73f0596650 perf(dropdown): significantly faster dropdown diffs 2024-10-05 01:47:37 +02:00
Michael Aaron Murphy
9e064e7fa0 feat: configurable fonts 2024-10-05 01:47:37 +02:00
Jeremy Soller
c9a2265ab1 Make text wrap configurable 2024-07-09 11:14:49 -06:00
Michael Aaron Murphy
f4936344f0
chore(doc): add documentation for a handful of widgets 2024-05-20 20:01:47 +02:00
Michael Aaron Murphy
bd353c6b54 improv(widget): share object-select svg handle between widgets using it 2024-02-26 19:17:49 +01:00
Ashley Wulber
f4ad098647 wip: update to use latest iced 2024-02-06 11:28:27 -05:00
Michael Aaron Murphy
74ee508427 fix(dropdown::multi): panic on missing paragraph 2023-12-09 03:51:25 +01:00
Michael Aaron Murphy
3608675358 fix(dropdown::multi): paragraphs missing in layout on first init 2023-12-05 17:12:52 +01:00
Michael Aaron Murphy
2cffbaf3a7 fix(dropdown::multi): set correct line height for descriptions 2023-12-05 17:12:52 +01:00
Michael Aaron Murphy
93cee0abab fix(dropdown::multi::menu): vertically center-align separators 2023-12-05 17:12:52 +01:00
Michael Aaron Murphy
50a94d590a fix(dropdown::multi::menu): option description off center by 8 pixels 2023-12-05 17:12:52 +01:00
Michael Aaron Murphy
6181d96f00 fix(dropdown::multi::menu): panic in layout 2023-12-05 17:12:52 +01:00
Ashley Wulber
fcfe9ebc59 chore: update iced 2023-12-04 17:53:24 -05:00
Ashley Wulber
17bc373990 clippy fixes 2023-12-04 17:53:24 -05:00
Ashley Wulber
0e9b46af72 update for multi-menu 2023-12-04 17:53:24 -05:00
Ashley Wulber
9202383596 chore: update to 0.12 2023-12-04 17:53:24 -05:00
Michael Aaron Murphy
bb7c7ac52a feat(widget): add dropdown::multi list widget 2023-11-30 22:20:12 +01:00
danieleades
8e99406a8b
chore: fixing linter warnings 2023-11-28 20:02:08 +01:00
Michael Aaron Murphy
ca7c17ce21 feat(widget): add dropdown widget as pick_list replacement
The Dropdown widget is based on the PickList widget from iced.
2023-10-24 19:45:21 +02:00