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
This commit is contained in:
parent
825794618f
commit
e562dfb1a0
@ -1400,8 +1400,6 @@ private:
|
|||||||
|
|
||||||
void wxPreviewControlBar::CreateButtons()
|
void wxPreviewControlBar::CreateButtons()
|
||||||
{
|
{
|
||||||
SetSize(0, 0, 400, 40);
|
|
||||||
|
|
||||||
SizerWithButtons sizer(this);
|
SizerWithButtons sizer(this);
|
||||||
|
|
||||||
// Print button group (a single button).
|
// Print button group (a single button).
|
||||||
@ -1614,7 +1612,7 @@ void wxPreviewFrame::CreateControlBar()
|
|||||||
if (m_printPreview->GetPrintoutForPrinting())
|
if (m_printPreview->GetPrintoutForPrinting())
|
||||||
buttons |= wxPREVIEW_PRINT;
|
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();
|
m_controlBar->CreateButtons();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user