From 3ceb246c2a8ead1bf00795a6b3c690c0bb4492c3 Mon Sep 17 00:00:00 2001 From: tye-exe Date: Wed, 16 Apr 2025 20:36:13 +0100 Subject: [PATCH] Changed `ui.disable()` to modify opacity It previously tinted elements, which could have lackluster effects. --- crates/egui/src/ui.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/crates/egui/src/ui.rs b/crates/egui/src/ui.rs index 0e8509bb8..32d6a5f37 100644 --- a/crates/egui/src/ui.rs +++ b/crates/egui/src/ui.rs @@ -521,8 +521,7 @@ impl Ui { pub fn disable(&mut self) { self.enabled = false; if self.is_visible() { - self.painter - .set_fade_to_color(Some(self.visuals().fade_out_to_color())); + self.painter.multiply_opacity(0.5); } }