X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9dff85155625b6cc35b719b6460a28f977dccb4c..ce8897bbff9d364dbef319bdec3db1126eb7fd92:/src/common/prntbase.cpp diff --git a/src/common/prntbase.cpp b/src/common/prntbase.cpp index 4dbfac6d5d..0b3899fdc4 100644 --- a/src/common/prntbase.cpp +++ b/src/common/prntbase.cpp @@ -188,7 +188,14 @@ wxPreviewCanvas::wxPreviewCanvas(wxPrintPreviewBase *preview, wxWindow *parent, wxScrolledWindow(parent, -1, pos, size, style, name) { m_printPreview = preview; - SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_APPWORKSPACE)); +#ifdef __WXMAC__ + // The app workspace colour is always white, but we should have + // a contrast with the page. + wxSystemColour colourIndex = wxSYS_COLOUR_3DDKSHADOW; +#else + wxSystemColour colourIndex = wxSYS_COLOUR_APPWORKSPACE; +#endif + SetBackgroundColour(wxSystemSettings::GetColour(colourIndex)); SetScrollbars(15, 18, 100, 100); } @@ -218,7 +225,14 @@ void wxPreviewCanvas::OnPaint(wxPaintEvent& WXUNUSED(event)) // Responds to colour changes, and passes event on to children. void wxPreviewCanvas::OnSysColourChanged(wxSysColourChangedEvent& event) { - SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_APPWORKSPACE)); +#ifdef __WXMAC__ + // The app workspace colour is always white, but we should have + // a contrast with the page. + wxSystemColour colourIndex = wxSYS_COLOUR_3DDKSHADOW; +#else + wxSystemColour colourIndex = wxSYS_COLOUR_APPWORKSPACE; +#endif + SetBackgroundColour(wxSystemSettings::GetColour(colourIndex)); Refresh(); // Propagate the event to the non-top-level children @@ -496,6 +510,13 @@ wxFrame(parent, -1, title, pos, size, style, name) m_printPreview = preview; m_controlBar = NULL; m_previewCanvas = NULL; + + // Looks silly on Windows with a standard Windows icon +#ifdef __WXMSW__ + wxFrame* topFrame = wxDynamicCast(wxTheApp->GetTopWindow(), wxFrame); + if (topFrame) + SetIcon(topFrame->GetIcon()); +#endif } wxPreviewFrame::~wxPreviewFrame() @@ -504,7 +525,11 @@ wxPreviewFrame::~wxPreviewFrame() void wxPreviewFrame::OnCloseWindow(wxCloseEvent& WXUNUSED(event)) { + // MakeModal doesn't work on wxMac, especially when there + // are multiple top-level windows. +#ifndef __WXMAC__ MakeModal(FALSE); +#endif // Need to delete the printout and the print preview wxPrintout *printout = m_printPreview->GetPrintout(); @@ -537,7 +562,11 @@ void wxPreviewFrame::Initialize() SetAutoLayout( TRUE ); SetSizer( item0 ); + // MakeModal doesn't work on wxMac, especially when there + // are multiple top-level windows. +#ifndef __WXMAC__ MakeModal(TRUE); +#endif Layout(); }