Auto-applied clippy lint suggestions across 23 files: collapse
`else { if … }` ladders, drop unneeded `return` statements, remove
needless borrows that were immediately auto-dereffed, swap `iter().next()`
for `first()`, drop redundant `.into()` to the same type, and similar
mechanical cleanups. Behavior is unchanged; the diff is -67 lines net.
The 33 remaining warnings are architectural and need manual attention
(very-complex-type aliases, too-many-arguments on internal helpers,
redundant must_use, needs-is_empty, etc.).
Leyoda 2026 – GPLv3
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
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
adds a feature to select from the start of the sentence until the last
occurrence of a character. This can be used to select until the
extension in cosmic-files save dialog or rename pop up.
Also, it adds a feature to select until the last occurrence of a
character on double-click.
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?)
RTL text will want to alight to the right, and will try to use all of an unbounded width in the input. It also tends to be offset in a negative direction.
The `drag_icon` callback is passed the offset of the cursor within the
widget at the start of the drag, and can return an offset the drag
surface should be placed relative to the cursor.
Increases Compact header height to 40 (from 36), to better accommodate larger widgets (e.g. the search bar). This makes it distinct from the SSD header, which is now addressed by the `_` match case.
Also makes the horizontal header padding fixed at 8, so that the app window padding can also be 8.