-
Hi I am trying to remove the shadow on a window and am unable to do it from setup, the style is only changed if I put the code in update. Is this normal or am I doing something wrong? impl epi::App for CalcApp {
fn update(&mut self, ctx: &egui::CtxRef, frame: &mut epi::Frame<'_>) {
Window::new("Calculator")
.frame(Frame::window(&ctx.style())) // Is still using default style
.show(ctx, |ui| {
ui.label("This is a window!");
});
}
fn setup(
&mut self,
ctx: &egui::CtxRef,
_frame: &mut epi::Frame<'_>,
_storage: Option<&dyn epi::Storage>,
) {
let mut style: egui::Style = (*ctx.style()).clone();
style.visuals.window_shadow = Shadow {
extrusion: 0.0,
color: color::Color32::TRANSPARENT,
};
ctx.set_style(style);
}
} |
Beta Was this translation helpful? Give feedback.
Answered by
emilk
Aug 21, 2021
Replies: 1 comment 4 replies
-
I fail to reproduce the problem on latest |
Beta Was this translation helpful? Give feedback.
4 replies
Answer selected by
emilk
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I fail to reproduce the problem on latest
master
.