Commit Graph

10 Commits

Author SHA1 Message Date
Vadim Zeitlin
4b57475e58 Fix wxFLEX_GROWMODE_ALL in wxFlexGridSizer with proportions
Setting wxFLEX_GROWMODE_ALL for the non-flexible direction broke
handling of proportions in the flexible direction which were
unexpectedly not taken into account at all any more due to not passing
them to DoAdjustForGrowables().

Fix this by still respecting the proportions in this case and add a test
case to ensure this doesn't get broken again.

See #23251, #23253.

(cherry picked from commit 6bfabd7afe16ed734565635228d540cb47b16970)
2023-02-14 00:47:40 +01:00
Vadim Zeitlin
9130f8bfc6 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.
2021-01-25 12:58:04 +01:00
Vadim Zeitlin
caf5a62fd9 Use different sections for different flags in wxGridSizer test
No real changes, just organize the tests a bit better.
2021-01-25 00:53:24 +01:00
Vadim Zeitlin
08d8d12872 Get rid of CppUnit boilerplate in wxGridSizer unit test
No real changes, just simplify and use CHECK() instead of
CPPUNIT_ASSERT_EQUAL() (which is the same as REQUIRE()).
2021-01-25 00:48:30 +01:00
PB
f57f214122 Remove BCC-specific hdrstop pragma from everywhere 2020-10-12 21:58:37 +02:00
Maarten Bent
57180d68c8 Add wxOVERRIDE to test files
And cleanup some tailing spaces and tabs.
2018-07-29 12:08:53 +02:00
Dimitri Schoolwerth
8f8d58d193 Use wx-prefixed macros throughout the repository.
Change {DECLARE,IMPLEMENT}_*CLASS and {DECLARE,BEGIN,END}_EVENT_TABLE
occurrences to use the wx-prefixed version of the macros.
2015-04-23 22:00:35 +04:00
Vadim Zeitlin
58114f22c3 Detect the use of incompatible flags for wxGridSizer too.
Complain if wxEXPAND is combined with both horizontal and vertical alignment
flags, as this doesn't make sense and, moreover, the behaviour has changed
since the last commit: now wxEXPAND is ignored instead of overriding the
alignment flags if they are combined.
2015-04-08 23:35:19 +02:00
Vadim Zeitlin
9aaa38c7c8 Make it possible to combine wxEXPAND and alignment in wxGridSizer.
Allow overriding wxEXPAND effect in one of the directions by specifying
wxALIGN_{RIGHT,BOTTOM} or wxALIGN_CENTRE_{HORIZONTAL,VERTICAL} together with
it (unfortunately this doesn't work for wxALIGN_{LEFT,TOP} as their value is 0
and so their presence in flags can't be detected).
2015-04-08 23:35:19 +02:00
Vadim Zeitlin
7e865daa26 Add unit test for wxFlexGridSizer layout logic.
Currently just test that wxEXPAND flag works as expected.
2015-04-08 23:35:19 +02:00