X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6bb7cee4e942e5816a02e03dcd4d13d5cfa91f19..3c5487b14442ddbc6e43ee2f4475b5a6ba251fb1:/src/gtk1/tbargtk.cpp diff --git a/src/gtk1/tbargtk.cpp b/src/gtk1/tbargtk.cpp index 4755e17a0e..daa9378a13 100644 --- a/src/gtk1/tbargtk.cpp +++ b/src/gtk1/tbargtk.cpp @@ -50,7 +50,7 @@ extern wxCursor g_globalCursor; // private functions // ---------------------------------------------------------------------------- -// translate wxWindows toolbar style flags to GTK orientation and style +// translate wxWidgets toolbar style flags to GTK orientation and style static void GetGtkStyle(long style, GtkOrientation *orient, GtkToolbarStyle *gtkStyle) { @@ -373,9 +373,7 @@ bool wxToolBar::Create( wxWindow *parent, m_parent->DoAddChild( this ); - PostCreation(); - - Show( TRUE ); + PostCreation(size); return TRUE; } @@ -705,4 +703,22 @@ void wxToolBar::OnInternalIdle() UpdateWindowUI(wxUPDATE_UI_FROMIDLE); } + +// ---------------------------------------------------------------------------- + +// static +wxVisualAttributes +wxToolBar::GetClassDefaultAttributes(wxWindowVariant WXUNUSED(variant)) +{ +#ifdef __WXGTK20__ + return GetDefaultAttributesFromGTKWidget(gtk_toolbar_new); +#else + wxVisualAttributes attr; + GtkWidget* widget = gtk_toolbar_new(GTK_ORIENTATION_HORIZONTAL, GTK_TOOLBAR_BOTH); + attr = GetDefaultAttributesFromGTKWidget(widget); + gtk_widget_destroy(widget); + return attr; +#endif +} + #endif // wxUSE_TOOLBAR_NATIVE