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

View File

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

View File

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