-
|
I haven't figured this out yet. Any suggestions? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
|
Solution! |
Beta Was this translation helpful? Give feedback.
-
|
Update to the accepted answer. let my_frame = egui::containers::Frame {
inner_margin: egui::style::Margin { left: 10., right: 10., top: 10., bottom: 10. },
outer_margin: egui::style::Margin { left: 10., right: 10., top: 10., bottom: 10. },
rounding: egui::Rounding { nw: 1.0, ne: 1.0, sw: 1.0, se: 1.0 },
shadow: eframe::epaint::Shadow { extrusion: 1.0, color: Color32::YELLOW },
fill: Color32::LIGHT_BLUE,
stroke: egui::Stroke::new(2.0, Color32::GOLD),
};
egui::CentralPanel::default().frame(my_frame).show(ctx, |ui| {}); |
Beta Was this translation helpful? Give feedback.
-
|
Update to the accepted answer: using let my_frame = egui::containers::Frame {
inner_margin: egui::epaint::Margin { left: 10., right: 10., top: 10., bottom: 10., },
outer_margin: egui::epaint::Margin { left: 10., right: 10., top: 10., bottom: 10., },
rounding: egui::Rounding { nw: 1.0, ne: 1.0, sw: 1.0, se: 1.0, },
shadow: eframe::epaint::Shadow { color: Color32::YELLOW, offset: eframe::egui::Vec2 { x: 0., y: 0. }, blur: 0., spread: 0., },
fill: Color32::LIGHT_BLUE,
stroke: egui::Stroke::new(2.0, Color32::GOLD),
};
egui::CentralPanel::default().frame(my_frame).show(ctx, |_ui| {}); |
Beta Was this translation helpful? Give feedback.
-
|
Updated for let my_frame = egui::containers::Frame {
inner_margin: egui::epaint::Margin { left: 10, right: 10, top: 10, bottom: 10, },
outer_margin: egui::epaint::Margin { left: 10, right: 10, top: 10, bottom: 10, },
corner_radius: egui::CornerRadius { nw: 1, ne: 1, sw: 1, se: 1, },
shadow: eframe::epaint::Shadow { color: egui::Color32::YELLOW, offset: [0, 0], blur: 0, spread: 0, },
fill: egui::Color32::LIGHT_BLUE,
stroke: egui::Stroke::new(2.0, egui::Color32::GOLD),
};
egui::CentralPanel::default().frame(my_frame).show(ctx, |_ui| {}); |
Beta Was this translation helpful? Give feedback.
Solution!