]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/wincmn.cpp
Fixed resize behaviour under certain circumstances.
[wxWidgets.git] / src / common / wincmn.cpp
index dd3822251dc7f176f2fa8020166cb9909fb237dd..d545072003f5bf9c87ebffc0eb103e48e5a1adf2 100644 (file)
@@ -118,8 +118,10 @@ void wxWindowBase::InitBase()
     wxSystemSettings settings;
 
     m_backgroundColour = settings.GetSystemColour(wxSYS_COLOUR_BTNFACE);
-    m_foregroundColour = *wxBLACK;  // TODO take this from sys settings too?
-#ifndef __WXMAC__
+    // m_foregroundColour = *wxBLACK;  // TODO take this from sys settings too?
+    m_foregroundColour = wxSystemSettings::GetSystemColour(wxSYS_COLOUR_WINDOWTEXT);
+
+#if !defined(__WXMAC__) && !defined(__WXGTK__)
     m_font = *wxSWISS_FONT;         //      and this?
 #else
        m_font = settings.GetSystemFont(wxSYS_DEFAULT_GUI_FONT);
@@ -158,9 +160,7 @@ bool wxWindowBase::CreateBase(wxWindowBase *parent,
                               const wxPoint& WXUNUSED(pos),
                               const wxSize& WXUNUSED(size),
                               long style,
-#if wxUSE_VALIDATORS
                               const wxValidator& validator,
-#endif
                               const wxString& name)
 {
     // m_isWindow is set to TRUE in wxWindowBase::Init() as well as many other
@@ -174,7 +174,10 @@ bool wxWindowBase::CreateBase(wxWindowBase *parent,
     SetName(name);
     SetWindowStyleFlag(style);
     SetParent(parent);
+
+#if wxUSE_VALIDATORS
     SetValidator(validator);
+#endif // wxUSE_VALIDATORS
 
     return TRUE;
 }
@@ -1216,14 +1219,14 @@ void wxWindowBase::UpdateWindowUI()
         }
 #endif // wxUSE_CHECKBOX
 
-#if wxUSE_RADIOBUTTON
+#if wxUSE_RADIOBTN
         wxRadioButton *radiobtn = wxDynamicCast(this, wxRadioButton);
         if ( radiobtn )
         {
             if ( event.GetSetChecked() )
                 radiobtn->SetValue(event.GetChecked());
         }
-#endif // wxUSE_RADIOBUTTON
+#endif // wxUSE_RADIOBTN
     }
 }