GNOME Bugzilla – Bug 690443
Printer list gets wider when a default printer is selected
Last modified: 2013-04-23 11:40:22 UTC
Created attachment 231826 [details] screenshots If you select a printer as default, a symbolic icon is added to the list, and this causes the list to grow wider and to move the content of the panel (see the attached screenshot). The list should have a fixed width - adding the icon should not affect the width. The list should also be wider by default.
Created attachment 242124 [details] [review] preserve width of list of printers when setting default printer Hi, attached is a patch which allocates fixed space for cell renderer showing the icon of default printer. Marek
Review of attachment 242124 [details] [review]: ::: panels/printers/cc-printers-panel.c @@ +1393,3 @@ "icon-name", PRINTER_DEFAULT_ICON_COLUMN, NULL); + gtk_icon_size_lookup (GTK_ICON_SIZE_MENU, &icon_width, NULL); + gtk_cell_renderer_set_fixed_size (icon_renderer2, icon_width, -1); I don't really like that. You could always add the "check" icon and always show, but change the opacity to 0 when you don't want to use it. That's how it was fixed in the region & language dialogues. See 7c341ed630116b7d0bbd1146acb9ea7b65f58731
(In reply to comment #2) > Review of attachment 242124 [details] [review]: > > ::: panels/printers/cc-printers-panel.c > @@ +1393,3 @@ > "icon-name", > PRINTER_DEFAULT_ICON_COLUMN, NULL); > + gtk_icon_size_lookup (GTK_ICON_SIZE_MENU, &icon_width, NULL); > + gtk_cell_renderer_set_fixed_size (icon_renderer2, icon_width, -1); > > I don't really like that. You could always add the "check" icon and always > show, but change the opacity to 0 when you don't want to use it. > > That's how it was fixed in the region & language dialogues. See > 7c341ed630116b7d0bbd1146acb9ea7b65f58731 This assumes that I have the icon widget accessible but I don't.
Of course, you still use a treeview... I guess it will have to do for now then.
Comment on attachment 242124 [details] [review] preserve width of list of printers when setting default printer Use an int though, not a gint.
Comment on attachment 242124 [details] [review] preserve width of list of printers when setting default printer Thank you for the review. I've committed the patch to master.