GNOME Bugzilla – Bug 656989
main window buttons don't have icons, regardless of toolbar-style setting in dconf
Last modified: 2013-11-08 19:46:06 UTC
Created attachment 194317 [details] no icons in buttons bug Daniel mentioned that this was fixed in master, but it apparently is not. The problem is that no matter the value in toolbar-style: diego@bellota:~$ gsettings get org.gnome.desktop.interface toolbar-style 'both-horiz' the buttons are always text-only. See screenshot. Yes, that's Daniel's hat.
Running Cheese from the terminal, I get: (cheese:26135): Gtk-WARNING **: Attempting to add a widget with type GtkImage to a GtkToggleButton, but as a GtkBin subclass a GtkToggleButton can only contain one widget at a time; it already contains a widget of type GtkLabel and many other similar messages. The images should instead be added to the buttons with gtk_button_set_image(), whereas in the Glade file they are currently children of the button. Whether the image is shown would then depend on the "gtk-button-images" setting: http://developer.gnome.org/gtk3/unstable/GtkSettings.html#GtkSettings--gtk-button-images
*** Bug 590943 has been marked as a duplicate of this bug. ***
Created attachment 197705 [details] [review] correctly add images to buttons Attached is a preliminary patch that adds images to the buttons correctly. I played around in Glade to get the images added, which led to a bit of shuffling in the .ui file, but the result seems a lot better, and correctly updates the image visibility depending on the gtk-button-images GtkSetting. I suppose that the Photo/Burst/Video buttons should only have text labels displayed if the images are not displayed. I also need to check that Glade did not adjust any padding or spacing. The code to get the label out of the button to enable markup is hacky, and should probably be replaced with a GtkStyleContext solution. This will be slightly more complicated, as the style context will have to react to theme changes (it would work by querying the font from the button, adding a bold style, and setting the new font on the button).
*** Bug 653237 has been marked as a duplicate of this bug. ***
I think the padding and spacing is ok. I do think that photo/burst/video mode button with only images instead of both would be much better, but is it "ok" to do that? It seems that "buttons-have-icons" should add icons beside the text. Maybe we can ask for some designer opinion? Anyway, I also get the warnings. This preliminary patch is much better than what we have now, so if you want to commit it the way it is, we can keep the bug opened for the improvements.
*** Bug 668594 has been marked as a duplicate of this bug. ***
Hi, I downloaded and compiled the cheese sources and I got the same warning, I was trying to read your patch but I got some doubts. First of all how can I get it? can I pull it form git repository somehow? which branch did u push it to? What I can see is that in chee-main-window there is a link to cheese-action through a related action field and in cheese-main-window an image is added to the button while in the related action a label is attached to it. The flow is something like: Button -> action add label to action add image to Button hence the button, through the action, already has a label added to it. Removing the label removes the warning, removing the related parameter removes the warning to and the software is not affected in any action. This makes me think that there is some ui design error on top of all. Furthermore I'm having troubles with glade (which supports only gtk3) and glate-gtk2 which find the same sort of errors when I try to load these files.
*** Bug 689178 has been marked as a duplicate of this bug. ***
with recent changes to shown text in most buttons, and symbolic icons in others, this is now obsolete.