diff --git a/src/aui/auibar.cpp b/src/aui/auibar.cpp index 3fe31d4b0c..d356d353a2 100644 --- a/src/aui/auibar.cpp +++ b/src/aui/auibar.cpp @@ -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); }