GNOME Bugzilla – Bug 162312
arrows are hard coded
Last modified: 2007-01-30 21:46:44 UTC
The arrow to expand a toolbar that is too small to show all the buttons, is hard coded. Instead the GtkArrow should be drawn. This is a design arrow right from the start, since a consistent UI can only be provided if all the components can be themed. With the current design this is impossible.
Sounds reasonable/right - can you knock up a fix ? or is this a dup. of #162761 ?
Nope, this is no dup of #162761 (I should know, what kinda bugs my brother is filing, right :) ) However, I myself can't code at all... I'll ask Benjamin about it. But I recall that he said it wasn't all that easy to to do for him.
Probably an easy task for someone with a few hours of spare time.
Created attachment 77446 [details] [review] Uses GtkArrow instead of GdkPixbuf Tried it with tests/test-toolbar, seems to work flawlessly. Please comment.
Michael, this looks straight forward?
looks perfect to me, go go go! :-)
Commited. Thanks.
With this change I get the following compiler warning: bonobo-ui-toolbar-popup-item.c: In function 'bonobo_ui_toolbar_popup_item_construct': bonobo-ui-toolbar-popup-item.c:75: warning: passing argument 2 of 'bonobo_ui_toolbar_toggle_button_item_construct' from incompatible pointer type This seems to come from the fact that the old code expects to be fed a GdkPixbuf containing the arrow, and the new one hands off a GtkWidget *arrow. Is this a problem in real life?
Created attachment 81549 [details] [review] patch This fixes a problem introduced by the pixbuf->arrow change (can't have a global static object!), and adds a comment about why it's ok to just cast from GtkWidget* to GdkPixbuf* to silence the compiler.
* bonobo/bonobo-ui-toolbar-popup-item.c: (set_arrow_orientation), (bonobo_ui_toolbar_popup_item_finalize), (bonobo_ui_toolbar_popup_item_class_init), (bonobo_ui_toolbar_popup_item_init), (bonobo_ui_toolbar_popup_item_construct): Fix a bug introduced by the switch to GtkArrow by creating one arrow per widget, not a global one. Silence a compiler warning, and add a comment explaining why it's ok to do so here. Bug #162312. * tests/test-toolbar.c: (main): Quit when closing the window.