Browse Source

FlexBox: Update the default value of FlexItem::alignSelf to match CSS implementations

v6.1.6
reuk 4 years ago
parent
commit
4d572411e0
No known key found for this signature in database GPG Key ID: 9ADCD339CFC98A11
2 changed files with 24 additions and 1 deletions
  1. +23
    -0
      BREAKING-CHANGES.txt
  2. +1
    -1
      modules/juce_gui_basics/layout/juce_FlexItem.h

+ 23
- 0
BREAKING-CHANGES.txt View File

@@ -4,6 +4,29 @@ JUCE breaking changes
develop
=======

Change
------
FlexItem::alignSelf now defaults to "autoAlign" rather than "stretch".

Possible Issues
---------------
FlexBox layouts will be different in cases where FlexBox::alignItems is set to
a value other than "stretch". This is because each FlexItem will now default
to using the FlexBox's alignItems value. Layouts that explicitly set
FlexItem::alignSelf on each item will not be affected.

Workaround
----------
To restore the previous layout behaviour, set FlexItem::alignSelf to "stretch"
on all FlexItems that would otherwise use the default value for alignSelf.

Rationale
---------
The new behaviour more closely matches the behaviour of CSS FlexBox
implementations. In CSS, "align-self" has an initial value of "auto", which
computes to the parent's "align-items" value.


Change
------
Functions on AudioPluginInstance that can add parameters have been made


+ 1
- 1
modules/juce_gui_basics/layout/juce_FlexItem.h View File

@@ -104,7 +104,7 @@ public:
This determines the alignment of the item along the cross-axis (perpendicular to the direction
of flow).
*/
AlignSelf alignSelf = AlignSelf::stretch;
AlignSelf alignSelf = AlignSelf::autoAlign;
//==============================================================================
/** This constant can be used for sizes to indicate that 'auto' mode should be used. */


Loading…
Cancel
Save