refactor: rename widgets to ui
consolidate ui related things like widgets into our ui module Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
17
src/ui/mod.rs
Normal file
17
src/ui/mod.rs
Normal file
@@ -0,0 +1,17 @@
|
||||
pub mod note;
|
||||
pub mod username;
|
||||
|
||||
pub use note::Note;
|
||||
pub use username::Username;
|
||||
|
||||
use egui::Margin;
|
||||
|
||||
pub fn padding<R>(
|
||||
amount: impl Into<Margin>,
|
||||
ui: &mut egui::Ui,
|
||||
add_contents: impl FnOnce(&mut egui::Ui) -> R,
|
||||
) -> egui::InnerResponse<R> {
|
||||
egui::Frame::none()
|
||||
.inner_margin(amount)
|
||||
.show(ui, add_contents)
|
||||
}
|
||||
Reference in New Issue
Block a user