From 13b55e77963c5811e5d83b96afbf660d2ef1a614 Mon Sep 17 00:00:00 2001 From: Paul Cornett Date: Sat, 24 May 2014 18:39:56 +0000 Subject: [PATCH] fix wxStaticText improperly wrapping text when initial size is fully specified, closes #16278 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76602 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/gtk/stattext.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/gtk/stattext.cpp b/src/gtk/stattext.cpp index 959c649f9a..97e4a6ac15 100644 --- a/src/gtk/stattext.cpp +++ b/src/gtk/stattext.cpp @@ -94,6 +94,13 @@ bool wxStaticText::Create(wxWindow *parent, PostCreation(size); +#ifndef __WXGTK3__ + // GtkLabel does its layout based on its size-request, rather than its + // actual size. The size-request may not always get set, specifically if + // the initial size is fully specified. So make sure it's set here. + gtk_widget_set_size_request(m_widget, m_width, m_height); +#endif + return true; }