]> git.saurik.com Git - wxWidgets.git/commitdiff
Have dark colour for preview canvas under Mac
authorJulian Smart <julian@anthemion.co.uk>
Thu, 17 Apr 2003 20:04:33 +0000 (20:04 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Thu, 17 Apr 2003 20:04:33 +0000 (20:04 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@20261 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/prntbase.cpp

index 694f5764788884e9165606f155a51794993642ee..492581ef08ed1ea304c605805b372771ead75488 100644 (file)
@@ -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_BTNFACE;
+#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_BTNFACE;
+#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()