From 6902e1ab3fae692a39228124eb9be6859b88432c Mon Sep 17 00:00:00 2001 From: bflatastic Date: Sat, 17 Oct 2026 13:49:07 +0700 Subject: [PATCH] Dialogs: drop the slider wrappers nothing calls since the named ones --- crates/ui-egui/src/dialogs/form.rs | 27 +++++---------------------- 1 file changed, 5 insertions(+), 22 deletions(-) diff --git a/crates/ui-egui/src/dialogs/form.rs b/crates/ui-egui/src/dialogs/form.rs index 82b3cb8db..d158db42a 100644 --- a/crates/ui-egui/src/dialogs/form.rs +++ b/crates/ui-egui/src/dialogs/form.rs @@ -480,20 +480,8 @@ pub(super) fn slider_w( }); } -/// The rail and value field of [`slider`] without its label (for a row that draws its own). -#[allow(dead_code)] -pub(super) fn slider_field( - ui: &mut egui::Ui, - d: &mut Dialog, - key: &str, - range: std::ops::RangeInclusive, - suffix: &str, - track: &dyn Fn(f32) -> egui::Color32, -) { - slider_field_named(ui, d, key, "", range, suffix, track); -} - -/// [`slider_field`] whose rail screen readers call `name` (the row's label, already translated). +/// The rail and value field of [`slider`] without its label (for a row that draws its own); screen +/// readers call the rail `name` (the row's label, already translated). pub(super) fn slider_field_named( ui: &mut egui::Ui, d: &mut Dialog, @@ -511,14 +499,9 @@ pub(super) fn slider_field_named( } } -/// The rail of [`slider_field`] alone: dragging it sets the number `d.fields[key]` to a whole -/// number in `range` (a value past the range shows at its end until the rail moves). -#[allow(dead_code)] -pub(super) fn slider_rail(ui: &mut egui::Ui, d: &mut Dialog, key: &str, range: std::ops::RangeInclusive, track: &dyn Fn(f32) -> egui::Color32) { - slider_rail_named(ui, d, key, "", range, track); -} - -/// [`slider_rail`] that screen readers call `name` (already translated). +/// The rail of [`slider_field_named`] alone: dragging it sets the number `d.fields[key]` to a +/// whole number in `range` (a value past the range shows at its end until the rail moves); screen +/// readers call it `name` (already translated). pub(super) fn slider_rail_named( ui: &mut egui::Ui, d: &mut Dialog,