X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d44a933726cbc30112dd8561d9991d8aa2577a97..3903f408241aedc3b2f5e24349d0ac939ba9164c:/src/gtk/stattext.cpp diff --git a/src/gtk/stattext.cpp b/src/gtk/stattext.cpp index 1befdd1c89..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) @@ -166,6 +167,16 @@ bool wxStaticText::SetForegroundColour(const wxColour& colour) return true; } +bool wxStaticText::GTKWidgetNeedsMnemonic() const +{ + return true; +} + +void wxStaticText::GTKWidgetDoSetMnemonic(GtkWidget* w) +{ + gtk_label_set_mnemonic_widget(GTK_LABEL(m_widget), w); +} + // static wxVisualAttributes wxStaticText::GetClassDefaultAttributes(wxWindowVariant WXUNUSED(variant))