Browse Source

Added new method FlexItem::withAlignSelf()

tags/2021-05-28
jules 9 years ago
parent
commit
901913a0da
2 changed files with 4 additions and 0 deletions
  1. +1
    -0
      modules/juce_gui_basics/layout/juce_FlexBox.cpp
  2. +3
    -0
      modules/juce_gui_basics/layout/juce_FlexItem.h

+ 1
- 0
modules/juce_gui_basics/layout/juce_FlexBox.cpp View File

@@ -842,3 +842,4 @@ FlexItem FlexItem::withHeight (float newHeight) const noexcept { auto fi =
FlexItem FlexItem::withMargin (Margin m) const noexcept { auto fi = *this; fi.margin = m; return fi; }
FlexItem FlexItem::withOrder (int newOrder) const noexcept { auto fi = *this; fi.order = newOrder; return fi; }
FlexItem FlexItem::withAlignSelf (AlignSelf a) const noexcept { auto fi = *this; fi.alignSelf = a; return fi; }

+ 3
- 0
modules/juce_gui_basics/layout/juce_FlexItem.h View File

@@ -155,4 +155,7 @@ public:
/** Returns a copy of this object with a new order. */
FlexItem withOrder (int newOrder) const noexcept;
/** Returns a copy of this object with a new alignSelf value. */
FlexItem withAlignSelf (AlignSelf newAlignSelf) const noexcept;
};

Loading…
Cancel
Save