]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/choicbkg.cpp
Finally corrected drawing of wxListCtrl selection rect for GTK+
[wxWidgets.git] / src / generic / choicbkg.cpp
index 9ba0e545e4d808529915fa8356f4b22e096a9005..057071f96ec4df0556294645864217755367bb47 100644 (file)
@@ -143,11 +143,15 @@ wxSize wxChoicebook::CalcSizeFromPage(const wxSize& sizePage) const
     wxSize size = sizePage;
     if ( IsVertical() )
     {
+        if ( sizeChoice.x > sizePage.x )
+            size.x = sizeChoice.x;
         size.y += sizeChoice.y + GetInternalBorder();
     }
     else // left/right aligned
     {
         size.x += sizeChoice.x + GetInternalBorder();
+        if ( sizeChoice.y > sizePage.y )
+            size.y = sizeChoice.y;
     }
 
     return size;
@@ -185,9 +189,16 @@ bool wxChoicebook::SetPageImage(size_t WXUNUSED(n), int WXUNUSED(imageId))
 }
 
 // ----------------------------------------------------------------------------
-// image list stuff
+// miscellaneous other stuff
 // ----------------------------------------------------------------------------
 
+void wxChoicebook::DoSetWindowVariant(wxWindowVariant variant)
+{
+    wxCHECK_RET( m_bookctrl, "can't be called before control creation" );
+
+    m_bookctrl->SetWindowVariant(variant);
+}
+
 void wxChoicebook::SetImageList(wxImageList *imageList)
 {
     // TODO: can be implemented in form of static bitmap near choice control