]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/notebook.cpp
Add required padding to DoGetBestSize() for small bitmaps when using themes
[wxWidgets.git] / src / msw / notebook.cpp
index e92244917aa1946d6ff8c3b05c974dffa3ff7575..f34fcbc97bb9ce2bcae133aec722ac69d78803e0 100644 (file)
@@ -268,14 +268,21 @@ bool wxNotebook::Create(wxWindow *parent,
                         long style,
                         const wxString& name)
 {
+    if ( (style & wxBK_ALIGN_MASK) == wxBK_DEFAULT )
+    {
+#if defined(__POCKETPC__)
+        style |= wxBK_BOTTOM | wxNB_FLAT;
+#else
+        style |= wxBK_TOP;
+#endif
+    }
+
 #ifdef __WXWINCE__
     // Not sure why, but without this style, there is no border
     // around the notebook tabs.
     if (style & wxNB_FLAT)
         style |= wxBORDER_SUNKEN;
 #endif
-    if ( (style & wxBK_ALIGN_MASK) == wxBK_DEFAULT )
-        style |= wxBK_TOP;
 
 #if !wxUSE_UXTHEME
     // ComCtl32 notebook tabs simply don't work unless they're on top if we have uxtheme, we can
@@ -811,6 +818,8 @@ int wxNotebook::HitTest(const wxPoint& pt, long *flags) const
             *flags |= wxNB_HITTEST_ONICON;
         if ((hitTestInfo.flags & TCHT_ONITEMLABEL) == TCHT_ONITEMLABEL)
             *flags |= wxNB_HITTEST_ONLABEL;
+        if ( item == wxNOT_FOUND && GetPageSize().Inside(pt) )
+            *flags |= wxNB_HITTEST_ONPAGE;
     }
 
     return item;