Don't change orthogonal alignment in wxSizerFlags::CenterXXX()
It was unexpected that using wxSizerFlags().Right().CentreVertical() didn't right-align the item because CentreVertical() reset the alignment in the horizontal direction rather than just setting it in the vertical one, so change this, document the new behaviour explicitly and add a new unit test checking for it. Closes #18989.
This commit is contained in:
@@ -1455,6 +1455,9 @@ public:
|
||||
them anyhow. For 2D sizers, centering an item in one direction is quite
|
||||
different from centering it in both directions however.
|
||||
|
||||
Note that, unlike Align(), this method doesn't change the vertical
|
||||
alignment.
|
||||
|
||||
@see CentreVertical()
|
||||
|
||||
@since 3.1.0
|
||||
@@ -1467,6 +1470,9 @@ public:
|
||||
The remarks in CentreHorizontal() documentation also apply to this
|
||||
function.
|
||||
|
||||
Note that, unlike Align(), this method doesn't change the horizontal
|
||||
alignment.
|
||||
|
||||
@since 3.1.0
|
||||
*/
|
||||
wxSizerFlags& CentreVertical();
|
||||
|
Reference in New Issue
Block a user