]> 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 2cca53006560b66dd1f292cce4852989e6ea4f33..f34fcbc97bb9ce2bcae133aec722ac69d78803e0 100644 (file)
     #include  "wx/string.h"
     #include  "wx/dc.h"
     #include  "wx/log.h"
     #include  "wx/string.h"
     #include  "wx/dc.h"
     #include  "wx/log.h"
+    #include  "wx/event.h"
+    #include  "wx/app.h"
+    #include  "wx/dcclient.h"
+    #include  "wx/dcmemory.h"
+    #include  "wx/control.h"
 #endif  // WX_PRECOMP
 
 #include  "wx/imaglist.h"
 #endif  // WX_PRECOMP
 
 #include  "wx/imaglist.h"
-#include  "wx/event.h"
-#include  "wx/control.h"
-#include  "wx/app.h"
 #include  "wx/sysopt.h"
 #include  "wx/sysopt.h"
-#include  "wx/dcclient.h"
-#include  "wx/dcmemory.h"
 
 #include  "wx/msw/private.h"
 
 #include  <windowsx.h>
 
 #include  "wx/msw/private.h"
 
 #include  <windowsx.h>
-
-#include <commctrl.h>
-
 #include "wx/msw/winundef.h"
 
 #include "wx/msw/winundef.h"
 
+// include <commctrl.h> "properly"
+#include "wx/msw/wrapcctl.h"
+
 #if wxUSE_UXTHEME
     #include "wx/msw/uxtheme.h"
 #endif
 #if wxUSE_UXTHEME
     #include "wx/msw/uxtheme.h"
 #endif
@@ -268,6 +268,15 @@ bool wxNotebook::Create(wxWindow *parent,
                         long style,
                         const wxString& name)
 {
                         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.
 #ifdef __WXWINCE__
     // Not sure why, but without this style, there is no border
     // around the notebook tabs.
@@ -809,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;
             *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;
     }
 
     return item;