]> git.saurik.com Git - wxWidgets.git/blobdiff - src/aui/auibar.cpp
fixing param
[wxWidgets.git] / src / aui / auibar.cpp
index 3fe31d4b0c109ff2ab4e3fd01318c2b7ade83b54..d356d353a208ebc5038f098bcf7302eace75db4e 100644 (file)
@@ -554,7 +554,13 @@ wxSize wxAuiDefaultToolBarArt::GetLabelSize(
 
     // get item's width
     width = item.GetMinSize().GetWidth();
-
+    
+    if (width == -1)
+    {
+        // no width specified, measure the text ourselves
+        width = dc.GetTextExtent(item.GetLabel()).GetX();
+    }
+    
     return wxSize(width, height);
 }