diff --git a/crates/ui-widgets/src/text/number.rs b/crates/ui-widgets/src/text/number.rs index dc1e693ab..96368dd8b 100644 --- a/crates/ui-widgets/src/text/number.rs +++ b/crates/ui-widgets/src/text/number.rs @@ -92,10 +92,6 @@ fn content_sized(cx: &MeasureCx<'_, C>) -> bool { const PRESETS: PartKey = PartKey::new("presets"); /// The chevron that opens the popup slider. const SLIDER: PartKey = PartKey::new("slider"); -/// The up half of the step arrows. -const STEP_UP: PartKey = PartKey::new("step_up"); -/// The down half of the step arrows. -const STEP_DOWN: PartKey = PartKey::new("step_down"); /// The style of a number field: the field look, which the chevrons are laid out by, and the unit's text. #[derive(Clone, Debug, PartialEq, ComponentStyle)] @@ -200,6 +196,11 @@ pub struct NumberField<'a, V: NumberValue + 'static = Option> { } impl<'a> NumberField<'a, Option> { + /// The up half of the step arrows ([`step_arrows`](Self::step_arrows)): a press steps the value up once. + pub const STEP_UP: PartKey = PartKey::new("step_up"); + /// The down half of the step arrows: a press steps the value down once. + pub const STEP_DOWN: PartKey = PartKey::new("step_down"); + /// A number field named `label`; empty text is `None`. pub fn new(label: impl Into