X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/76ed8f8d9c2b826d77d70b41c046decbde23da35..24178e4a14a3d10e5f389ce7d8eb35f6636df001:/src/common/prntbase.cpp diff --git a/src/common/prntbase.cpp b/src/common/prntbase.cpp index 290aeddf66..c8cba869c4 100644 --- a/src/common/prntbase.cpp +++ b/src/common/prntbase.cpp @@ -222,7 +222,7 @@ void wxPreviewCanvas::OnSysColourChanged(wxSysColourChangedEvent& event) */ BEGIN_EVENT_TABLE(wxPreviewControlBar, wxPanel) - EVT_BUTTON(wxID_PREVIEW_CLOSE, wxPreviewControlBar::OnClose) + EVT_BUTTON(wxID_PREVIEW_CLOSE, wxPreviewControlBar::OnWindowClose) EVT_BUTTON(wxID_PREVIEW_PRINT, wxPreviewControlBar::OnPrint) EVT_BUTTON(wxID_PREVIEW_PREVIOUS, wxPreviewControlBar::OnPrevious) EVT_BUTTON(wxID_PREVIEW_NEXT, wxPreviewControlBar::OnNext) @@ -259,7 +259,7 @@ void wxPreviewControlBar::OnPaint(wxPaintEvent& WXUNUSED(event)) dc.DrawLine( 0, h-1, w, h-1 ); } -void wxPreviewControlBar::OnClose(wxCommandEvent& WXUNUSED(event)) +void wxPreviewControlBar::OnWindowClose(wxCommandEvent& WXUNUSED(event)) { wxPreviewFrame *frame = (wxPreviewFrame *)GetParent(); frame->Close(TRUE); @@ -312,6 +312,7 @@ void wxPreviewControlBar::CreateButtons() { SetSize(0, 0, 400, 40); + /* #ifdef __WXMSW__ int fontSize = 9; #else @@ -320,6 +321,7 @@ void wxPreviewControlBar::CreateButtons() wxFont buttonFont(fontSize, wxSWISS, wxNORMAL, wxBOLD); SetFont(buttonFont); + */ int buttonWidth = 65; #ifdef __WXGTK__ @@ -330,7 +332,12 @@ void wxPreviewControlBar::CreateButtons() int x = 5; int y = 5; + +#ifdef __WXMOTIF__ + int gap = 15; +#else int gap = 5; +#endif m_closeButton = new wxButton(this, wxID_PREVIEW_CLOSE, _("Close"), wxPoint(x, y), wxSize(buttonWidth, buttonHeight)); @@ -394,7 +401,7 @@ void wxPreviewControlBar::CreateButtons() delete[] choices; - m_closeButton->SetDefault(); + // m_closeButton->SetDefault(); } void wxPreviewControlBar::SetZoomControl(int zoom) @@ -408,7 +415,7 @@ void wxPreviewControlBar::SetZoomControl(int zoom) int wxPreviewControlBar::GetZoomControl() { char buf[20]; - if (m_zoomControl && m_zoomControl->GetStringSelection()) + if (m_zoomControl && (m_zoomControl->GetStringSelection() != "")) { strcpy(buf, m_zoomControl->GetStringSelection()); buf[strlen(buf) - 1] = 0; @@ -708,7 +715,7 @@ bool wxPrintPreviewBase::DrawBlankPage(wxWindow *canvas, wxDC& dc) /* dc.DrawRectangle((int)(x-1 + shadowOffset), (int)(y-1 + shadowOffset), (int)(actualWidth+2), (int)(actualHeight+2)); */ - dc.DrawRectangle((int)(x + shadowOffset), (int)(y + actualHeight), (int)(actualWidth), shadowOffset); + dc.DrawRectangle((int)(x + shadowOffset), (int)(y + actualHeight+1), (int)(actualWidth), shadowOffset); dc.DrawRectangle((int)(x + actualWidth), (int)(y + shadowOffset), shadowOffset, (int)(actualHeight)); // Draw blank page allowing for 1-pixel border AROUND the actual page @@ -722,7 +729,7 @@ bool wxPrintPreviewBase::DrawBlankPage(wxWindow *canvas, wxDC& dc) printf( "x: %d y: %d w: %d h: %d.\n", (int)r.x, (int)r.y, (int)r.width, (int)r.height ); */ - dc.DrawRectangle((int)(x-1), (int)(y-1), (int)(actualWidth+2), (int)(actualHeight+2)); + dc.DrawRectangle((int)(x-2), (int)(y-1), (int)(actualWidth+3), (int)(actualHeight+2)); return TRUE; }