X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/85eb36c267bd325e113ee9e3b84f6b191ed116f2..ce4169a4d129fc6cd165b2e9ccc5cf5d48356020:/src/gtk/tbargtk.cpp diff --git a/src/gtk/tbargtk.cpp b/src/gtk/tbargtk.cpp index 9f82a552b5..651c6ba081 100644 --- a/src/gtk/tbargtk.cpp +++ b/src/gtk/tbargtk.cpp @@ -12,6 +12,9 @@ #endif #include "wx/toolbar.h" + +#if wxUSE_TOOLBAR + #include "wx/frame.h" #include "glib.h" @@ -74,10 +77,11 @@ static gint gtk_toolbar_enter_callback( GtkWidget *WXUNUSED(widget), if (g_blockEventsOnDrag) return TRUE; - /* we grey-out the tip text of disabled tool */ wxToolBar *tb = tool->m_owner; + /* we grey-out the tip text of disabled tool */ +#if 0 if (tool->m_enabled) { if (tb->m_fg->red != 0) @@ -121,6 +125,7 @@ static gint gtk_toolbar_enter_callback( GtkWidget *WXUNUSED(widget), #endif } } +#endif /* emit the event */ @@ -289,7 +294,8 @@ wxToolBarTool *wxToolBar::AddTool( int toolIndex, const wxBitmap& bitmap, mask = bitmap.GetMask()->GetBitmap(); tool_pixmap = gtk_pixmap_new( pixmap, mask ); - + gtk_pixmap_set_build_insensitive( GTK_PIXMAP(tool_pixmap), TRUE ); + gtk_misc_set_alignment( GTK_MISC(tool_pixmap), 0.5, 0.5 ); wxToolBarTool *tool = new wxToolBarTool( this, toolIndex, bitmap, pushedBitmap, @@ -371,11 +377,10 @@ void wxToolBar::EnableTool(int toolIndex, bool enable) tool->m_enabled = enable; /* we don't disable the tools for now as the bitmaps don't get - greyed anyway and this also disables tooltips + greyed anyway and this also disables tooltips */ if (tool->m_item) gtk_widget_set_sensitive( tool->m_item, enable ); -*/ return; } @@ -582,3 +587,4 @@ void wxToolBar::OnIdle( wxIdleEvent &WXUNUSED(ievent) ) } } +#endif