From f58199e2ce9444795e7cd1f602aba6bb471005f6 Mon Sep 17 00:00:00 2001 From: tye-exe Date: Mon, 19 May 2025 10:30:37 +0100 Subject: [PATCH] Removed remaining references to `Visuals::fade_out_by` --- crates/egui/src/style.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/crates/egui/src/style.rs b/crates/egui/src/style.rs index 0e4d990af..21dfb85a6 100644 --- a/crates/egui/src/style.rs +++ b/crates/egui/src/style.rs @@ -1057,7 +1057,7 @@ impl Visuals { /// When fading out things, we multiply the opacity by this. #[inline(always)] - pub fn fade_out_opacity(&self) -> f32 { + pub fn disabled_alpha(&self) -> f32 { self.disabled_alpha } @@ -1065,7 +1065,7 @@ impl Visuals { #[doc(alias = "grey_out")] #[inline(always)] pub fn gray_out(&self, color: Color32) -> Color32 { - color.gamma_multiply(self.fade_out_opacity()) + color.gamma_multiply(self.disabled_alpha()) } } @@ -2065,7 +2065,7 @@ impl Visuals { image_loading_spinners, numeric_color_space, - disabled_alpha: fade_out_by, + disabled_alpha, } = self; ui.collapsing("Background Colors", |ui| { @@ -2195,7 +2195,7 @@ impl Visuals { numeric_color_space.toggle_button_ui(ui); }); - ui.add(Slider::new(fade_out_by, 0.0..=1.0).text("Disabled element alpha")); + ui.add(Slider::new(disabled_alpha, 0.0..=1.0).text("Disabled element alpha")); }); ui.vertical_centered(|ui| reset_button(ui, self, "Reset visuals"));