From 8d1c5c3f5781e806d0449a53ba167786ff342ae9 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Thu, 8 Jun 2006 18:15:56 +0000 Subject: [PATCH] Add 1 to the width returned by DoGetBestSize in order to work around a GTK issue where it sometimes wrapps the text needlessly git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39636 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/gtk/stattext.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gtk/stattext.cpp b/src/gtk/stattext.cpp index 2641ea02f3..c8ab59de09 100644 --- a/src/gtk/stattext.cpp +++ b/src/gtk/stattext.cpp @@ -154,7 +154,8 @@ wxSize wxStaticText::DoGetBestSize() const gtk_label_set_line_wrap( GTK_LABEL(m_widget), TRUE ); - return wxSize (req.width, req.height); + // Adding 1 to width to workaround GTK sometimes wrapping the text needlessly + return wxSize (req.width+1, req.height); } bool wxStaticText::SetForegroundColour(const wxColour& colour)