X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/385e8575dd1f9219fb0e3f7fa26ffe4c24d2fdbb..0980e7b3239f825316dde94c61c01bf210dc135b:/src/gtk/toolbar.cpp diff --git a/src/gtk/toolbar.cpp b/src/gtk/toolbar.cpp index 2c2e60441b..8e86454c75 100644 --- a/src/gtk/toolbar.cpp +++ b/src/gtk/toolbar.cpp @@ -168,20 +168,6 @@ enter_notify_event(GtkWidget*, GdkEventCrossing* event, wxToolBarTool* tool) } } -//----------------------------------------------------------------------------- -// "size_request" from m_toolbar -//----------------------------------------------------------------------------- - -extern "C" { -static void -size_request(GtkWidget*, GtkRequisition* req, wxToolBar* win) -{ - const wxSize margins = win->GetMargins(); - req->width += margins.x; - req->height += 2 * margins.y; -} -} - //----------------------------------------------------------------------------- // "expose_event" from GtkImage inside m_item //----------------------------------------------------------------------------- @@ -312,7 +298,7 @@ void wxToolBarTool::ShowDropdown(GtkToggleButton* button) if (menu) { GtkAllocation alloc; - gtk_widget_set_allocation(GTK_WIDGET(button), &alloc); + gtk_widget_get_allocation(GTK_WIDGET(button), &alloc); int x = alloc.x; int y = alloc.y; if (toolbar->HasFlag(wxTB_LEFT | wxTB_RIGHT)) @@ -415,9 +401,6 @@ bool wxToolBar::Create( wxWindow *parent, PostCreation(size); - g_signal_connect_after(m_toolbar, "size_request", - G_CALLBACK(size_request), this); - return true; } @@ -502,7 +485,7 @@ bool wxToolBar::DoInsertTool(size_t pos, wxToolBarToolBase *toolBase) break; case wxITEM_RADIO: radioGroup = GetRadioGroup(pos); - if (radioGroup) + if (!radioGroup) { // this is the first button in the radio button group, // it will be toggled automatically by GTK so bring the @@ -597,12 +580,6 @@ bool wxToolBar::DoInsertTool(size_t pos, wxToolBarToolBase *toolBase) gtk_toolbar_insert(m_toolbar, tool->m_item, int(pos)); g_object_unref(tool->m_item); } - // Inserted items "slide" into place using an animated effect that - // causes multiple size events on the item. Must set size request - // to keep item size from getting permanently set too small by the - // first of these size events. - const wxSize size = control->GetSize(); - gtk_widget_set_size_request(control->m_widget, size.x, size.y); break; } gtk_widget_show(GTK_WIDGET(tool->m_item));