diff --git a/src/aui/auibar.cpp b/src/aui/auibar.cpp index 05917b9a55..f2f3622f64 100644 --- a/src/aui/auibar.cpp +++ b/src/aui/auibar.cpp @@ -539,7 +539,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); }