yoda: iced_widget cleanup (7→0 warnings)
Some checks are pending
Audit / vulnerabilities (push) Waiting to run
Check / wasm (push) Waiting to run
Check / widget (push) Waiting to run
Document / all (push) Waiting to run
Format / all (push) Waiting to run
Lint / all (push) Waiting to run
Test / all (macOS-latest, beta) (push) Waiting to run
Test / all (macOS-latest, 1.88) (push) Waiting to run
Test / all (macOS-latest, stable) (push) Waiting to run
Test / all (ubuntu-latest, 1.88) (push) Waiting to run
Test / all (ubuntu-latest, beta) (push) Waiting to run
Test / all (ubuntu-latest, stable) (push) Waiting to run
Test / all (windows-latest, 1.88) (push) Waiting to run
Test / all (windows-latest, beta) (push) Waiting to run
Test / all (windows-latest, stable) (push) Waiting to run
Some checks are pending
Audit / vulnerabilities (push) Waiting to run
Check / wasm (push) Waiting to run
Check / widget (push) Waiting to run
Document / all (push) Waiting to run
Format / all (push) Waiting to run
Lint / all (push) Waiting to run
Test / all (macOS-latest, beta) (push) Waiting to run
Test / all (macOS-latest, 1.88) (push) Waiting to run
Test / all (macOS-latest, stable) (push) Waiting to run
Test / all (ubuntu-latest, 1.88) (push) Waiting to run
Test / all (ubuntu-latest, beta) (push) Waiting to run
Test / all (ubuntu-latest, stable) (push) Waiting to run
Test / all (windows-latest, 1.88) (push) Waiting to run
Test / all (windows-latest, beta) (push) Waiting to run
Test / all (windows-latest, stable) (push) Waiting to run
- overlay/menu.rs:578: real bug fix — List::draw was rendering with
text::Wrapping::default() instead of the configured self.text_wrap.
Wiring it through eliminates the 'field never read' warning AND
honors the wrap setting that was being silently dropped.
- slider.rs:735-744: replace `if let Ok(x) = …try_into() { … }` with
irrefutable `let Ok(x) = …try_into();` (the conversion is provably
Infallible at the call site). Same behavior, no compiler noise.
- lazy.rs:8 / lazy/component.rs:13: drop unused
`iced_renderer::core::widget::Operation` imports.
Leyoda 2026 – GPLv3
This commit is contained in:
parent
e424487704
commit
d33d068c17
4 changed files with 9 additions and 15 deletions
|
|
@ -5,7 +5,6 @@ pub mod component;
|
|||
|
||||
#[allow(deprecated)]
|
||||
pub use component::Component;
|
||||
use iced_renderer::core::widget::Operation;
|
||||
|
||||
mod cache;
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@ use crate::core::{
|
|||
self, Clipboard, Element, Length, Rectangle, Shell, Size, Vector, Widget,
|
||||
};
|
||||
|
||||
use iced_renderer::core::widget::Operation;
|
||||
use ouroboros::self_referencing;
|
||||
use std::cell::RefCell;
|
||||
use std::marker::PhantomData;
|
||||
|
|
|
|||
|
|
@ -575,7 +575,7 @@ where
|
|||
align_x: text::Alignment::Default,
|
||||
align_y: alignment::Vertical::Center,
|
||||
shaping: self.text_shaping,
|
||||
wrapping: text::Wrapping::default(),
|
||||
wrapping: self.text_wrap,
|
||||
ellipsize: text::Ellipsize::default(),
|
||||
},
|
||||
Point::new(bounds.x + self.padding.left, bounds.center_y()),
|
||||
|
|
|
|||
|
|
@ -732,18 +732,14 @@ where
|
|||
node.set_labelled_by(label.clone());
|
||||
}
|
||||
|
||||
if let Ok(min) = self.range.start().clone().try_into() {
|
||||
node.set_min_numeric_value(min);
|
||||
}
|
||||
if let Ok(max) = self.range.end().clone().try_into() {
|
||||
node.set_max_numeric_value(max);
|
||||
}
|
||||
if let Ok(value) = self.value.clone().try_into() {
|
||||
node.set_numeric_value(value);
|
||||
}
|
||||
if let Ok(step) = self.step.clone().try_into() {
|
||||
node.set_numeric_value_step(step);
|
||||
}
|
||||
let Ok(min) = self.range.start().clone().try_into();
|
||||
node.set_min_numeric_value(min);
|
||||
let Ok(max) = self.range.end().clone().try_into();
|
||||
node.set_max_numeric_value(max);
|
||||
let Ok(value) = self.value.clone().try_into();
|
||||
node.set_numeric_value(value);
|
||||
let Ok(step) = self.step.clone().try_into();
|
||||
node.set_numeric_value_step(step);
|
||||
|
||||
// TODO: This could be a setting on the slider
|
||||
node.set_live(iced_accessibility::accesskit::Live::Polite);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue