]> git.saurik.com Git - wxWidgets.git/commitdiff
wxSYS_COLOUR_WINDOW is better for window backgrounds on PPC/Smartphone
authorJulian Smart <julian@anthemion.co.uk>
Sat, 2 Apr 2005 17:24:44 +0000 (17:24 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Sat, 2 Apr 2005 17:24:44 +0000 (17:24 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33270 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/wincmn.cpp

index 5f9a9a9ed70c8d4b5bde59c56803375d20e66297..4a3b32676e613adc0eb8560c67e0e03a33127a26 100644 (file)
@@ -1044,8 +1044,17 @@ wxWindowBase::GetClassDefaultAttributes(wxWindowVariant WXUNUSED(variant))
     wxVisualAttributes attrs;
     attrs.font = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
     attrs.colFg = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT);
-    attrs.colBg = wxSystemSettings::GetColour(wxSYS_COLOUR_BTNFACE);
 
+    // On Smartphone/PocketPC, wxSYS_COLOUR_WINDOW is a better reflection of
+    // the usual background colour than wxSYS_COLOUR_BTNFACE.
+    // It's a pity that wxSYS_COLOUR_WINDOW isn't always a suitable background
+    // colour on other platforms.
+
+#if defined(__WXWINCE__) && (defined(__SMARTPHONE__) || defined(__POCKETPC__))
+    attrs.colBg = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW);
+#else
+    attrs.colBg = wxSystemSettings::GetColour(wxSYS_COLOUR_BTNFACE);
+#endif
     return attrs;
 }