ui.rs (261B)
1 use egui::Margin; 2 3 pub fn padding<R>( 4 amount: impl Into<Margin>, 5 ui: &mut egui::Ui, 6 add_contents: impl FnOnce(&mut egui::Ui) -> R, 7 ) -> egui::InnerResponse<R> { 8 egui::Frame::none() 9 .inner_margin(amount) 10 .show(ui, add_contents) 11 }