mirror of
https://github.com/emilk/egui.git
synced 2026-09-01 06:10:06 -04:00
Changed ui.disable() to modify opacity
It previously tinted elements, which could have lackluster effects.
This commit is contained in:
@@ -521,8 +521,7 @@ impl Ui {
|
|||||||
pub fn disable(&mut self) {
|
pub fn disable(&mut self) {
|
||||||
self.enabled = false;
|
self.enabled = false;
|
||||||
if self.is_visible() {
|
if self.is_visible() {
|
||||||
self.painter
|
self.painter.multiply_opacity(0.5);
|
||||||
.set_fade_to_color(Some(self.visuals().fade_out_to_color()));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user