From e9cafd42895c93cc11fc63b245fbade167b82a62 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Thu, 1 Apr 2004 11:04:33 +0000 Subject: [PATCH] use wxFULL_REPAINT_ON_RESIZE only for wxPreviewCanvas, not for the entire wxPreviewFrame -- this eliminates flicker of the control bar, at least git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26537 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/prntbase.h | 2 +- src/common/prntbase.cpp | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/include/wx/prntbase.h b/include/wx/prntbase.h index 829d17f87a..d7ed29ed22 100644 --- a/include/wx/prntbase.h +++ b/include/wx/prntbase.h @@ -197,7 +197,7 @@ public: const wxString& title = wxT("Print Preview"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long style = wxDEFAULT_FRAME_STYLE|wxFULL_REPAINT_ON_RESIZE, + long style = wxDEFAULT_FRAME_STYLE, const wxString& name = wxT("frame")); ~wxPreviewFrame(); diff --git a/src/common/prntbase.cpp b/src/common/prntbase.cpp index 7545ff42a3..afd9f47e25 100644 --- a/src/common/prntbase.cpp +++ b/src/common/prntbase.cpp @@ -184,9 +184,13 @@ void wxPrintout::GetPageInfo(int *minPage, int *maxPage, int *fromPage, int *toP * Preview canvas */ +// VZ: the current code doesn't refresh properly without +// wxFULL_REPAINT_ON_RESIZE, this must be fixed as otherwise we have +// really horrible flicker when resizing the preview frame, but without +// this style it simply doesn't work correctly at all... wxPreviewCanvas::wxPreviewCanvas(wxPrintPreviewBase *preview, wxWindow *parent, const wxPoint& pos, const wxSize& size, long style, const wxString& name): -wxScrolledWindow(parent, -1, pos, size, style, name) +wxScrolledWindow(parent, -1, pos, size, style | wxFULL_REPAINT_ON_RESIZE, name) { m_printPreview = preview; #ifdef __WXMAC__ -- 2.45.2