Skip to content

Commit

Permalink
Use Explicit Names for Flex Direction (#2672)
Browse files Browse the repository at this point in the history
# Objective

- Clarify vague meaning of "Ltr" and "Rtl". For someone familiar with Flex Box, this is easy to understand, but being more explicit will help beginners or those unfamiliar, without the need to do research.

## Solution

- Change three letter abbreviation to fully descriptive name.
  • Loading branch information
mirkoRainer committed Aug 24, 2021
1 parent 481fa3c commit 958f8b1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions crates/bevy_ui/src/flex/convert.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@ impl From<Direction> for stretch::style::Direction {
fn from(value: Direction) -> Self {
match value {
Direction::Inherit => stretch::style::Direction::Inherit,
Direction::Ltr => stretch::style::Direction::LTR,
Direction::Rtl => stretch::style::Direction::RTL,
Direction::LeftToRight => stretch::style::Direction::LTR,
Direction::RightToLeft => stretch::style::Direction::RTL,
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions crates/bevy_ui/src/ui_node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,8 @@ impl Default for AlignContent {
#[reflect_value(PartialEq, Serialize, Deserialize)]
pub enum Direction {
Inherit,
Ltr,
Rtl,
LeftToRight,
RightToLeft,
}

impl Default for Direction {
Expand Down

0 comments on commit 958f8b1

Please sign in to comment.