From: Vadim Zeitlin Date: Mon, 3 Jan 2011 15:57:30 +0000 (+0000) Subject: Don't hardcode wxPreviewControlBar size in print preview code. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/e562dfb1a0dbabd0a93d50495de52e827efc59a9?ds=inline Don't hardcode wxPreviewControlBar size in print preview code. For some reason the control bar height was hard coded to 40 pixels which could be not enough to use the buttons of the appropriate size. Don't hardcode its size any more and let the sizer determine it instead. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66540 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/common/prntbase.cpp b/src/common/prntbase.cpp index 5828c67977..be09647180 100644 --- a/src/common/prntbase.cpp +++ b/src/common/prntbase.cpp @@ -1400,8 +1400,6 @@ private: void wxPreviewControlBar::CreateButtons() { - SetSize(0, 0, 400, 40); - SizerWithButtons sizer(this); // Print button group (a single button). @@ -1614,7 +1612,7 @@ void wxPreviewFrame::CreateControlBar() if (m_printPreview->GetPrintoutForPrinting()) buttons |= wxPREVIEW_PRINT; - m_controlBar = new wxPreviewControlBar(m_printPreview, buttons, this, wxPoint(0,0), wxSize(400, 40)); + m_controlBar = new wxPreviewControlBar(m_printPreview, buttons, this); m_controlBar->CreateButtons(); }