Skip to content

PhotoCraft: An open-source, photo editor written by scratch in pure Rust

Merge upstream/main into stream/issue-5914-exposure-decimals

nrq6993-a11yb180cfd40df8
diff --cc crates/ui-egui/src/widgets.rs
index 941677b32,0a9105838..232a63313
--- a/crates/ui-egui/src/widgets.rs
+++ b/crates/ui-egui/src/widgets.rs
@@@ -497,10 -516,10 +516,12 @@@ fn take_label_scrub(ui: &Ui, rect: Rect
struct FieldOpts {
/// Decimal places shown (default: one, or two for a small range).
decimals: Option<u32>,
+ /// Arrow-key and scrub step follow `decimals` (adjustment rows via [`slider_row_prec`], #5914).
+ step_from_decimals: bool,
/// The unit typed units convert into (default: the suffix's, at [`set_field_resolution`]).
units: Option<FieldUnits>,
+ /// The length (px) 100 % stands for, so lengths and percentages convert into each other.
+ extent: Option<f64>,
wrap_drag: bool,
}
@@@ -541,7 -547,7 +562,7 @@@ fn value_field_box
trailing: f32,
opts: FieldOpts,
) -> (Response, Rect) {
- let FieldOpts { decimals, step_from_decimals, units, wrap_drag } = opts;
- let FieldOpts { decimals, units, extent, wrap_drag } = opts;
++ let FieldOpts { decimals, step_from_decimals, units, extent, wrap_drag } = opts;
let t = Tokens::get(ui.ctx());
let (rect, slot) = ui.allocate_exact_size(size, Sense::hover());
let scrub = take_label_scrub(ui, rect).map(|s| {