]> git.saurik.com Git - wxWidgets.git/commitdiff
Changed wxWindowBase foreground to use wxSystemSettings, and changed wxTextCtrl
authorJulian Smart <julian@anthemion.co.uk>
Thu, 13 Jan 2000 14:26:30 +0000 (14:26 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Thu, 13 Jan 2000 14:26:30 +0000 (14:26 +0000)
to only be grey for single-line read-only controls.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5373 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/wincmn.cpp
src/msw/textctrl.cpp

index 25925b61339c43d19f3a9e06dcaffb76b3219587..d545072003f5bf9c87ebffc0eb103e48e5a1adf2 100644 (file)
@@ -118,7 +118,9 @@ void wxWindowBase::InitBase()
     wxSystemSettings settings;
 
     m_backgroundColour = settings.GetSystemColour(wxSYS_COLOUR_BTNFACE);
     wxSystemSettings settings;
 
     m_backgroundColour = settings.GetSystemColour(wxSYS_COLOUR_BTNFACE);
-    m_foregroundColour = *wxBLACK;  // TODO take this from sys settings too?
+    // 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
 #if !defined(__WXMAC__) && !defined(__WXGTK__)
     m_font = *wxSWISS_FONT;         //      and this?
 #else
index 162933d4c1471f6e085f39a3c398e60dd76ecd98..347fd91f7cf77de4ed719210ee1d8adb42153b07 100644 (file)
@@ -353,10 +353,8 @@ void wxTextCtrl::AdoptAttributesFromHWND()
 
 void wxTextCtrl::SetupColours()
 {
 
 void wxTextCtrl::SetupColours()
 {
-    // FIXME why is bg colour not inherited from parent?
-
     wxColour bkgndColour;
     wxColour bkgndColour;
-    if (IsEditable())
+    if (IsEditable() || (m_windowStyle & wxTE_MULTILINE))
         bkgndColour = wxSystemSettings::GetSystemColour(wxSYS_COLOUR_WINDOW);
     else
         bkgndColour = wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE);
         bkgndColour = wxSystemSettings::GetSystemColour(wxSYS_COLOUR_WINDOW);
     else
         bkgndColour = wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE);