X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f40fdaa339e19bbdf60c9c065c82daae4ca77b36..31ad423e4fb556ec225a63b161154d3bf3445c1b:/src/gtk/control.cpp diff --git a/src/gtk/control.cpp b/src/gtk/control.cpp index e638c35d8d..5adb0823c6 100644 --- a/src/gtk/control.cpp +++ b/src/gtk/control.cpp @@ -66,6 +66,7 @@ void wxControl::SetLabel( const wxString &label ) } m_label << *pc; } + InvalidateBestSize(); } wxString wxControl::GetLabel() const @@ -85,7 +86,9 @@ wxSize wxControl::DoGetBestSize() const (* GTK_WIDGET_CLASS( GTK_OBJECT_GET_CLASS(m_widget) )->size_request ) (m_widget, &req ); - return wxSize(req.width, req.height); + wxSize best(req.width, req.height); + CacheBestSize(best); + return best; } @@ -201,7 +204,7 @@ wxControl::GetDefaultAttributesFromGTKWidget(GtkWidget* widget, if ( style && style->font_desc ) { wxNativeFontInfo info; - info.description = style->font_desc; + info.description = pango_font_description_copy(style->font_desc); attr.font = wxFont(info); } else @@ -267,21 +270,5 @@ wxControl::GetDefaultAttributesFromGTKWidget(GtkWidget* (*widget_new)(GtkAdjustm return attr; } -void wxControl::ApplyWidgetStyle() -{ - GtkRcStyle *style = CreateWidgetStyle(); - if ( style ) - { - DoApplyWidgetStyle(style); - gtk_rc_style_unref(style); - } -} - -void wxControl::DoApplyWidgetStyle(GtkRcStyle *style) -{ - gtk_widget_modify_style(m_widget, style); -} - - #endif // wxUSE_CONTROLS