X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7fff16b863c4fb4c92d44d08e91b31e835c904d0..ad653fa23069c5d9378247084f03c9a718c3ad62:/src/gtk/control.cpp?ds=sidebyside diff --git a/src/gtk/control.cpp b/src/gtk/control.cpp index 770ce7b116..705da6fa50 100644 --- a/src/gtk/control.cpp +++ b/src/gtk/control.cpp @@ -105,7 +105,6 @@ void wxControl::PostCreation(const wxSize& size) gtk_widget_ensure_style(m_widget); #endif - GTKApplyWidgetStyle(); SetInitialSize(size); } @@ -317,16 +316,7 @@ wxSize wxControl::GTKGetPreferredSize(GtkWidget* widget) const { GtkRequisition req; #ifdef __WXGTK3__ - if (gtk_widget_get_request_mode(widget) != GTK_SIZE_REQUEST_HEIGHT_FOR_WIDTH) - { - gtk_widget_get_preferred_height(widget, NULL, &req.height); - gtk_widget_get_preferred_width_for_height(widget, req.height, NULL, &req.width); - } - else - { - gtk_widget_get_preferred_width(widget, NULL, &req.width); - gtk_widget_get_preferred_height_for_width(widget, req.width, NULL, &req.height); - } + gtk_widget_get_preferred_size(widget, NULL, &req); #else GTK_WIDGET_GET_CLASS(widget)->size_request(widget, &req); #endif