X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9dc44eff0235c5f30940f32ccc6d9d82a236e7d2..95316a3f245a4baf3046e97222660bed986153ed:/src/gtk/button.cpp?ds=sidebyside diff --git a/src/gtk/button.cpp b/src/gtk/button.cpp index 6e496d75bb..f5f76a7b10 100644 --- a/src/gtk/button.cpp +++ b/src/gtk/button.cpp @@ -171,17 +171,12 @@ wxSize wxButtonBase::GetDefaultSize() // button's size. We have to retrieve both values and combine them. GtkWidget *wnd = gtk_window_new(GTK_WINDOW_TOPLEVEL); - GtkWidget *box = gtk_hbutton_box_new(); + GtkWidget *box = gtk_button_box_new(GTK_ORIENTATION_HORIZONTAL); GtkWidget *btn = gtk_button_new_from_stock(GTK_STOCK_CANCEL); gtk_container_add(GTK_CONTAINER(box), btn); gtk_container_add(GTK_CONTAINER(wnd), box); GtkRequisition req; -#ifdef __WXGTK3__ - gtk_widget_get_preferred_height(btn, NULL, &req.height); - gtk_widget_get_preferred_width_for_height(btn, req.height, NULL, &req.width); -#else - gtk_widget_size_request(btn, &req); -#endif + gtk_widget_get_preferred_size(btn, NULL, &req); gint minwidth, minheight; gtk_widget_style_get(box, @@ -334,7 +329,7 @@ wxSize wxButton::DoGetBestSize() const wxVisualAttributes wxButton::GetClassDefaultAttributes(wxWindowVariant WXUNUSED(variant)) { - return GetDefaultAttributesFromGTKWidget(gtk_button_new); + return GetDefaultAttributesFromGTKWidget(gtk_button_new()); } #endif // wxUSE_BUTTON