mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-28 02:30:05 +00:00
Added another constructor to FlexItem::Margin
This commit is contained in:
parent
17600a2902
commit
c545b58f03
2 changed files with 5 additions and 3 deletions
|
|
@ -806,8 +806,9 @@ FlexItem::FlexItem (float w, float h, FlexBox& fb) noexcept : FlexItem (w, h
|
|||
FlexItem::FlexItem (Component& c) noexcept : associatedComponent (&c) {}
|
||||
FlexItem::FlexItem (FlexBox& fb) noexcept : associatedFlexBox (&fb) {}
|
||||
|
||||
FlexItem::Margin::Margin() noexcept : left(), right(), top(), bottom() {}
|
||||
FlexItem::Margin::Margin (float v) noexcept : left (v), right (v), top (v), bottom (v) {}
|
||||
FlexItem::Margin::Margin() noexcept : left(), right(), top(), bottom() {}
|
||||
FlexItem::Margin::Margin (float v) noexcept : left (v), right (v), top (v), bottom (v) {}
|
||||
FlexItem::Margin::Margin (float l, float r, float t, float b) noexcept : left (l), right (r), top (t), bottom (b) {}
|
||||
|
||||
//==============================================================================
|
||||
FlexItem FlexItem::withFlex (float newFlexGrow) const noexcept
|
||||
|
|
@ -840,4 +841,4 @@ FlexItem FlexItem::withMaxHeight (float newMaxHeight) const noexcept { auto fi =
|
|||
FlexItem FlexItem::withHeight (float newHeight) const noexcept { auto fi = *this; fi.height = newHeight; return 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::withOrder (int newOrder) const noexcept { auto fi = *this; fi.order = newOrder; return fi; }
|
||||
|
|
|
|||
|
|
@ -111,6 +111,7 @@ public:
|
|||
{
|
||||
Margin() noexcept; /**< Creates a margin of size zero. */
|
||||
Margin (float size) noexcept; /**< Creates a margin with this size on all sides. */
|
||||
Margin (float left, float right, float top, float bottom) noexcept; /**< Creates a margin with these sizes. */
|
||||
|
||||
float left; /**< Left margin size */
|
||||
float right; /**< Right margin size */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue