]> git.saurik.com Git - wxWidgets.git/blobdiff - src/univ/themes/win32.cpp
Also allow key events for Shift-Tab when wxWANTS_CHARS style is used
[wxWidgets.git] / src / univ / themes / win32.cpp
index 8629507e498732ceab7fe9545194772a080e7633..426420ec26f4b0efe24fd98b65b0c3b79e4a8276 100644 (file)
@@ -38,6 +38,7 @@
     #include "wx/scrolbar.h"
     #include "wx/slider.h"
     #include "wx/textctrl.h"
+    #include "wx/listbox.h"
     #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 ( 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);
-            //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
     {
@@ -3598,7 +3610,6 @@ void wxWin32Renderer::DrawFrameTitleBar(wxDC& dc,
             DrawFrameButton(dc, x, y, wxTOPLEVEL_BUTTON_HELP,
                             (specialButton == wxTOPLEVEL_BUTTON_HELP) ?
                             specialButtonFlags : 0);
-            x -= FRAME_BUTTON_WIDTH;
         }
     }
 }