Skip to content

Commit

Permalink
Remove margins.rs (bevyengine#4284)
Browse files Browse the repository at this point in the history
# Objective

- Closes bevyengine#335.
- Part of the splitting process of bevyengine#3503.

## Solution

- Remove the `margins.rs` file containing the `Margins` type.

## Reasons

- It is unused inside of `bevy`.
- The `Rect`/`UiRect` is identical to the `Margins` type and is also used for margins inside of `bevy` (rename of `Rect` happens in bevyengine#4276)
- Discussion in bevyengine#3503.

## Changelog

### Removed

- The `Margins` type got removed.

## Migration Guide

- The `Margins` type got removed. To migrate you just have to change every occurrence of `Margins` to `UiRect`.
  • Loading branch information
KDecay authored and ItsDoot committed Feb 1, 2023
1 parent 490f0f9 commit 522c195
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 38 deletions.
4 changes: 1 addition & 3 deletions crates/bevy_ui/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
//! This UI is laid out with the Flexbox paradigm (see <https://cssreference.io/flexbox/> ) except the vertical axis is inverted
mod flex;
mod focus;
mod margins;
mod render;
mod ui_node;

Expand All @@ -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::*;
Expand Down
35 changes: 0 additions & 35 deletions crates/bevy_ui/src/margins.rs

This file was deleted.

0 comments on commit 522c195

Please sign in to comment.