[gnome-control-center] printers: Preserve width when setting default printer
- From: Marek Kašík <mkasik src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] printers: Preserve width when setting default printer
- Date: Tue, 23 Apr 2013 11:39:02 +0000 (UTC)
commit 323c09e0b2287faf03553f3be39b4205a2aae834
Author: Marek Kasik <mkasik redhat com>
Date: Mon Apr 22 13:41:40 2013 +0200
printers: Preserve width when setting default printer
Allocate fixed space for cell renderer showing icon of default
printer.
https://bugzilla.gnome.org/show_bug.cgi?id=690443
panels/printers/cc-printers-panel.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/panels/printers/cc-printers-panel.c b/panels/printers/cc-printers-panel.c
index 620f38c..2486cc5 100644
--- a/panels/printers/cc-printers-panel.c
+++ b/panels/printers/cc-printers-panel.c
@@ -1352,6 +1352,7 @@ populate_printers_list (CcPrintersPanel *self)
GtkCellRenderer *icon_renderer2;
GtkCellRenderer *renderer;
GtkWidget *treeview;
+ int icon_width;
priv = PRINTERS_PANEL_PRIVATE (self);
@@ -1390,6 +1391,8 @@ populate_printers_list (CcPrintersPanel *self)
g_object_set (G_OBJECT (icon_renderer2), "follow-state", TRUE, NULL);
column = gtk_tree_view_column_new_with_attributes ("Default", icon_renderer2,
"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);
gtk_tree_view_column_set_expand (column, FALSE);
gtk_tree_view_append_column (GTK_TREE_VIEW (treeview), column);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]