Film Grain dialog: the sliders use the shared grey rail

This commit is contained in:
bflatastic 2026-10-12 06:54:48 +07:00
parent 810af8d001
commit f683f0ff29
1 changed files with 1 additions and 2 deletions

View File

@ -167,7 +167,6 @@ pub(crate) const FILM_GRAIN_FIELDS: [(&str, &str, f64); 3] =
fn film_grain_fields(ui: &mut egui::Ui, d: &mut Dialog) -> bool {
let before = d.fields.clone();
let rail = |v: f32| egui::Color32::from_gray((48.0 + 192.0 * v).round() as u8);
// Use one column wide enough for this language's longest label, keeping every rail aligned.
let font = egui::TextStyle::Body.resolve(ui.style());
let text = Tokens::get(ui.ctx()).text;
@ -178,7 +177,7 @@ fn film_grain_fields(ui: &mut egui::Ui, d: &mut Dialog) -> bool {
.ceil()
+ 4.0;
for (key, label, max) in FILM_GRAIN_FIELDS {
form::slider_w(ui, d, (key, label, label_w), 0.0..=max, "", &rail);
form::slider_w(ui, d, (key, label, label_w), 0.0..=max, "", &grey_rail);
}
before != d.fields
}