From de8ade0ddba66676fd0b82da1fdfe45c133e9f68 Mon Sep 17 00:00:00 2001 From: kdecay Date: Mon, 21 Mar 2022 09:48:17 +0100 Subject: [PATCH] Remove margins.rs --- crates/bevy_ui/src/lib.rs | 4 +--- crates/bevy_ui/src/margins.rs | 35 ----------------------------------- 2 files changed, 1 insertion(+), 38 deletions(-) delete mode 100644 crates/bevy_ui/src/margins.rs diff --git a/crates/bevy_ui/src/lib.rs b/crates/bevy_ui/src/lib.rs index 2a44323966a3d..872a2bb9eef85 100644 --- a/crates/bevy_ui/src/lib.rs +++ b/crates/bevy_ui/src/lib.rs @@ -4,7 +4,6 @@ //! This UI is laid out with the Flexbox paradigm (see ) except the vertical axis is inverted mod flex; mod focus; -mod margins; mod render; mod ui_node; @@ -15,14 +14,13 @@ pub mod widget; use bevy_render::camera::CameraTypePlugin; pub use flex::*; pub use focus::*; -pub use margins::*; pub use render::*; pub use ui_node::*; #[doc(hidden)] pub mod prelude { #[doc(hidden)] - pub use crate::{entity::*, ui_node::*, widget::Button, Interaction, Margins}; + pub use crate::{entity::*, ui_node::*, widget::Button, Interaction}; } use bevy_app::prelude::*; diff --git a/crates/bevy_ui/src/margins.rs b/crates/bevy_ui/src/margins.rs deleted file mode 100644 index 124467c7f5529..0000000000000 --- a/crates/bevy_ui/src/margins.rs +++ /dev/null @@ -1,35 +0,0 @@ -/// Defines the margins of a UI node -#[derive(Debug, Clone)] -pub struct Margins { - /// Left margin size in pixels - pub left: f32, - /// Right margin size in pixels - pub right: f32, - /// Bottom margin size in pixels - pub bottom: f32, - /// Top margin size in pixels - pub top: f32, -} - -impl Margins { - /// Creates a new Margins based on the input - pub fn new(left: f32, right: f32, bottom: f32, top: f32) -> Self { - Margins { - left, - right, - bottom, - top, - } - } -} - -impl Default for Margins { - fn default() -> Self { - Margins { - left: 0.0, - right: 0.0, - bottom: 0.0, - top: 0.0, - } - } -}