]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/notebook.cpp
some tweaks
[wxWidgets.git] / src / msw / notebook.cpp
index 4ba885a2665ace81c60b777d9bd9227166ac6f40..cd19ed2b0d0e419e9282cab664a5899257498d8a 100644 (file)
@@ -761,6 +761,13 @@ bool wxNotebook::InsertPage(size_t nPage,
         return false;
     }
 
+    // need to update the bg brush when the first page is added
+    // so the first panel gets the correct themed background
+    if ( m_pages.empty() )
+    {
+        UpdateBgBrush();
+    }
+
     // succeeded: save the pointer to the page
     m_pages.Insert(pPage, nPage);
 
@@ -819,7 +826,7 @@ int wxNotebook::HitTest(const wxPoint& pt, long *flags) const
             *flags |= wxBK_HITTEST_ONICON;
         if ((hitTestInfo.flags & TCHT_ONITEMLABEL) == TCHT_ONITEMLABEL)
             *flags |= wxBK_HITTEST_ONLABEL;
-        if ( item == wxNOT_FOUND && GetPageSize().Inside(pt) )
+        if ( item == wxNOT_FOUND && GetPageSize().Contains(pt) )
             *flags |= wxBK_HITTEST_ONPAGE;
     }