Fix invalid use of wxSizer flags inside the library itself.

It doesn't make sense to use wxALIGN_CENTRE_VERTICAL with wxGROW, so remove
the alignment style.
This commit is contained in:
Vadim Zeitlin 2015-04-05 20:46:00 +02:00
parent 16c22794b7
commit a5988a0389
3 changed files with 7 additions and 6 deletions

View File

@ -91,9 +91,10 @@ public: // public API
{ {
int f = GetDefaultPickerCtrlFlag(); int f = GetDefaultPickerCtrlFlag();
if ( grow ) if ( grow )
{
f &= ~wxALIGN_MASK;
f |= wxGROW; f |= wxGROW;
else }
f &= ~wxGROW;
GetPickerCtrlItem()->SetFlag(f); GetPickerCtrlItem()->SetFlag(f);
} }
@ -153,7 +154,7 @@ protected:
{ {
// on macintosh, without additional borders // on macintosh, without additional borders
// there's not enough space for focus rect // there's not enough space for focus rect
return wxALIGN_CENTER_VERTICAL|wxGROW return wxALIGN_CENTER_VERTICAL
#ifdef __WXMAC__ #ifdef __WXMAC__
| wxTOP | wxRIGHT | wxBOTTOM | wxTOP | wxRIGHT | wxBOTTOM
#endif #endif

View File

@ -8,7 +8,7 @@
<object class="wxBoxSizer"> <object class="wxBoxSizer">
<orient>wxVERTICAL</orient> <orient>wxVERTICAL</orient>
<object class="sizeritem"> <object class="sizeritem">
<flag>wxGROW|wxALIGN_CENTER_VERTICAL|wxALL</flag> <flag>wxGROW|wxALL</flag>
<border>5</border> <border>5</border>
<object class="wxTextCtrl" name="message_textctrl"> <object class="wxTextCtrl" name="message_textctrl">
<size>500,150</size> <size>500,150</size>

View File

@ -92,8 +92,8 @@ wxChoicebook::Create(wxWindow *parent,
mainSizer->Add(0, 0, 1, wxEXPAND, 0); mainSizer->Add(0, 0, 1, wxEXPAND, 0);
m_controlSizer = new wxBoxSizer(IsVertical() ? wxHORIZONTAL : wxVERTICAL); m_controlSizer = new wxBoxSizer(IsVertical() ? wxHORIZONTAL : wxVERTICAL);
m_controlSizer->Add(m_bookctrl, 1, (IsVertical() ? wxALIGN_CENTRE_VERTICAL : wxALIGN_CENTRE) |wxGROW, 0); m_controlSizer->Add(m_bookctrl, 1, wxGROW, 0);
mainSizer->Add(m_controlSizer, 0, (IsVertical() ? (int) wxGROW : (int) wxALIGN_CENTRE_VERTICAL)|wxALL, m_controlMargin); mainSizer->Add(m_controlSizer, 0, (IsVertical() ? wxGROW : wxALIGN_CENTRE_VERTICAL)|wxALL, m_controlMargin);
SetSizer(mainSizer); SetSizer(mainSizer);
return true; return true;
} }