X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/031b2a7b8d8a303e1d012cf63eb989d247005084..a4388683f1b20020b5425c59c401d6ab673860de:/src/common/prntbase.cpp diff --git a/src/common/prntbase.cpp b/src/common/prntbase.cpp index ee3811f915..36de9a627d 100644 --- a/src/common/prntbase.cpp +++ b/src/common/prntbase.cpp @@ -189,7 +189,7 @@ wxPreviewCanvas::wxPreviewCanvas(wxPrintPreviewBase *preview, wxWindow *parent, m_printPreview = preview; SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_APPWORKSPACE)); - SetScrollbars(40, 40, 100, 100); + SetScrollbars(15, 18, 100, 100); } wxPreviewCanvas::~wxPreviewCanvas() @@ -705,14 +705,24 @@ bool wxPrintPreviewBase::DrawBlankPage(wxWindow *canvas, wxDC& dc) int shadowOffset = 4; dc.SetPen(*wxBLACK_PEN); dc.SetBrush(*wxBLACK_BRUSH); +/* dc.DrawRectangle((int)(x-1 + shadowOffset), (int)(y-1 + shadowOffset), (int)(actualWidth+2), (int)(actualHeight+2)); +*/ + 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 dc.SetPen(*wxBLACK_PEN); dc.SetBrush(*wxWHITE_BRUSH); - - dc.DrawRectangle((int)(x-1), (int)(y-1), (int)(actualWidth+2), (int)(actualHeight+2)); +/* + wxRegion update_region = canvas->GetUpdateRegion(); + wxRect r = update_region.GetBox(); + + 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-2), (int)(y-1), (int)(actualWidth+3), (int)(actualHeight+2)); return TRUE; }