]> git.saurik.com Git - wxWidgets.git/commitdiff
repaired setting foreground colours for the standard controls
authorVadim Zeitlin <vadim@wxwidgets.org>
Thu, 16 Dec 2004 01:50:34 +0000 (01:50 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Thu, 16 Dec 2004 01:50:34 +0000 (01:50 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31024 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/control.cpp

index fe571c753671fc628656dea267f785f099d343d8..d32372b29ff15225c84d976a1a189f19458fe9ac 100644 (file)
@@ -335,7 +335,11 @@ WXHBRUSH wxControl::MSWControlColorSolid(WXHDC pDC, wxColour colBg)
 {
     HDC hdc = (HDC)pDC;
     if ( m_hasFgCol )
+    {
         ::SetTextColor(hdc, wxColourToRGB(GetForegroundColour()));
+        if ( !colBg.Ok() )
+            colBg = GetBackgroundColour();
+    }
 
     if ( colBg.Ok() )
     {