]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/toplevel.cpp
splitted wxApp docs in wxApp+wxAppConsole docs; fix the signature of the documented...
[wxWidgets.git] / src / mac / carbon / toplevel.cpp
index 740c8c3a77a7a9f742063edfa9721c1c3fe2bb72..12e9408f9b678213a283682557317f37b4a1b9b5 100644 (file)
@@ -990,17 +990,23 @@ wxPoint wxTopLevelWindowMac::GetClientAreaOrigin() const
     return wxPoint(0, 0) ;
 }
 
-bool wxTopLevelWindowMac::SetBackgroundColour(const wxColour& col )
-{
+bool wxTopLevelWindowMac::SetBackgroundColour(const wxColour& c )
+{
+    wxColour col = c;
+    if ( col == wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) )
+        col = wxColour(wxMacCreateCGColorFromHITheme(kThemeBrushDocumentWindowBackground));
+    else if ( col == wxSystemSettings::GetColour( wxSYS_COLOUR_3DFACE ) )
+        col = wxColour(wxMacCreateCGColorFromHITheme(kThemeBrushDialogBackgroundActive));
+        
     if ( !wxTopLevelWindowBase::SetBackgroundColour(col) && m_hasBgCol )
         return false ;
     
-    if ( col == wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) || col == wxColour(wxMacCreateCGColorFromHITheme(kThemeBrushDocumentWindowBackground)) )
+    if ( col == wxColour(wxMacCreateCGColorFromHITheme(kThemeBrushDocumentWindowBackground)) )
     {
         SetThemeWindowBackground( (WindowRef) m_macWindow,  kThemeBrushDocumentWindowBackground, false ) ;
         SetBackgroundStyle(wxBG_STYLE_CUSTOM);
     }
-    else if ( col == wxSystemSettings::GetColour( wxSYS_COLOUR_3DFACE ) || col == wxColour(wxMacCreateCGColorFromHITheme(kThemeBrushDialogBackgroundActive)) )
+    else if ( col == wxColour(wxMacCreateCGColorFromHITheme(kThemeBrushDialogBackgroundActive)) )
     {
         SetThemeWindowBackground( (WindowRef) m_macWindow,  kThemeBrushDialogBackgroundActive, false ) ;
         SetBackgroundStyle(wxBG_STYLE_CUSTOM);
@@ -1209,7 +1215,7 @@ void  wxTopLevelWindowMac::DoMacCreateRealWindow(
     SetWindowBounds(  (WindowRef) m_macWindow , kWindowStructureRgn , &theBoundsRect ) ;
 
     wxAssociateWinWithMacWindow( (WindowRef) m_macWindow , this ) ;
-    SetWindowTitleWithCFString( (WindowRef) m_macWindow , wxCFStringRef( title , m_font.GetEncoding() ) );
+    SetWindowTitleWithCFString( (WindowRef) m_macWindow , wxCFStringRef( title , GetFont().GetEncoding() ) );
     m_peer = new wxMacControl(this , true /*isRootControl*/) ;
 
     // There is a bug in 10.2.X for ::GetRootControl returning the window view instead of
@@ -1306,7 +1312,7 @@ void wxTopLevelWindowMac::MacActivate( long timestamp , bool WXUNUSED(inIsActiva
 void wxTopLevelWindowMac::SetTitle(const wxString& title)
 {
     wxWindow::SetLabel( title ) ;
-    SetWindowTitleWithCFString( (WindowRef) m_macWindow , wxCFStringRef( title , m_font.GetEncoding() ) ) ;
+    SetWindowTitleWithCFString( (WindowRef) m_macWindow , wxCFStringRef( title , GetFont().GetEncoding() ) ) ;
 }
 
 wxString wxTopLevelWindowMac::GetTitle() const
@@ -1830,7 +1836,7 @@ static SInt32 wxShapedMacWindowGetFeatures(WindowRef WXUNUSED(window), SInt32 pa
     *(OptionBits*)param =
         //kWindowCanGrow |
         //kWindowCanZoom |
-        //kWindowCanCollapse |
+        kWindowCanCollapse |
         //kWindowCanGetWindowRegion |
         //kWindowHasTitleBar |
         //kWindowSupportsDragHilite |