Fix wrong use of wxALIGN_CENTER_VERTICAL in wxPreviewFrame.

Don't use this flag in a vertical sizer, it doesn't make sense.

Also use wxSizerFlags instead of multiple argument Add() overload for clarity.

Closes #16953.
This commit is contained in:
Vadim Zeitlin 2015-04-15 09:54:17 +02:00
parent 594dc3396a
commit 7203160a29

View File

@ -1719,8 +1719,8 @@ void wxPreviewFrame::InitializeWithModality(wxPreviewFrameModalityKind kind)
wxBoxSizer *item0 = new wxBoxSizer( wxVERTICAL );
item0->Add( m_controlBar, 0, wxGROW|wxALIGN_CENTER_VERTICAL, 5 );
item0->Add( m_previewCanvas, 1, wxGROW|wxALIGN_CENTER_VERTICAL, 5 );
item0->Add( m_controlBar, wxSizerFlags().Expand().Border() );
item0->Add( m_previewCanvas, wxSizerFlags(1).Expand().Border() );
SetAutoLayout( true );
SetSizer( item0 );