]> git.saurik.com Git - wxWidgets.git/commitdiff
Improved colours in wxUniv -- white (window colour) was
authorJulian Smart <julian@anthemion.co.uk>
Tue, 13 Jan 2004 14:48:35 +0000 (14:48 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Tue, 13 Jan 2004 14:48:35 +0000 (14:48 +0000)
being used as the default.

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

src/univ/statusbr.cpp
src/univ/themes/win32.cpp

index 6e775a60fca0723c71bc0bfca086e65f42763bab..71ffd980dddc989fd360043618d108183025dadf 100644 (file)
@@ -72,7 +72,7 @@ bool wxStatusBarUniv::Create(wxWindow *parent,
     }
 
     SetFieldsCount(1);
     }
 
     SetFieldsCount(1);
-
+    
     CreateInputHandler(wxINP_HANDLER_STATUSBAR);
 
     SetSize(DoGetBestSize());
     CreateInputHandler(wxINP_HANDLER_STATUSBAR);
 
     SetSize(DoGetBestSize());
index 24e9cd5eb8818f98793cf7237449a22c40b569b9..426420ec26f4b0efe24fd98b65b0c3b79e4a8276 100644 (file)
@@ -38,6 +38,7 @@
     #include "wx/scrolbar.h"
     #include "wx/slider.h"
     #include "wx/textctrl.h"
     #include "wx/scrolbar.h"
     #include "wx/slider.h"
     #include "wx/textctrl.h"
+    #include "wx/listbox.h"
     #include "wx/toolbar.h"
 
     #ifdef __WXMSW__
     #include "wx/toolbar.h"
 
     #ifdef __WXMSW__
@@ -1333,18 +1334,29 @@ wxColour wxWin32ColourScheme::GetBackground(wxWindow *win) const
     if ( !win->ShouldInheritColours() )
     {
         wxTextCtrl *text = wxDynamicCast(win, wxTextCtrl);
     if ( !win->ShouldInheritColours() )
     {
         wxTextCtrl *text = wxDynamicCast(win, wxTextCtrl);
-        if ( text )
+#if wxUSE_LISTBOX
+        wxListBox* listBox = wxDynamicCast(win, wxListBox);
+#endif        
+        if ( text
+#if wxUSE_LISTBOX
+         || listBox
+#endif         
+          )
         {
         {
-            if ( !text->IsEnabled() ) // not IsEditable()
+            if ( !win->IsEnabled() ) // not IsEditable()
                 col = Get(CONTROL);
                 col = Get(CONTROL);
-            //else: execute code below
-        }
-
-        if ( !col.Ok() )
-        {
-            // doesn't depend on the state
-            col = Get(WINDOW);
+            else
+            {
+                if ( !col.Ok() )
+                {
+                    // doesn't depend on the state
+                    col = Get(WINDOW);
+                }
+            }
         }
         }
+        
+        if (!col.Ok())
+            col = Get(CONTROL); // Most controls should be this colour, not WINDOW
     }
     else
     {
     }
     else
     {