summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Napias <[email protected]>2019-05-12 19:40:07 +0200
committermonsta <[email protected]>2019-06-10 11:35:52 +0300
commitad16bc21a6eec19d980f68ada38cb79ed5c750a5 (patch)
treeaa6688eac7dbe9fd14c98845dd9a75f621fee7d7
parent1651325cd97df0f5e2067b502657e7acaf875894 (diff)
downloadmate-control-center-1.20.tar.bz2
mate-control-center-1.20.tar.xz
Fix the icon sizes in Preferred Applications selector1.20
Fixes https://github.com/mate-desktop/mate-control-center/issues/358 (squashed 4a3d516c04e1c87e89e6ac5015c8ace0575729cd + 4962557c6f6af249bc3bf8b99baacbed473a16b4 for 1.20 branch)
-rw-r--r--capplets/default-applications/mate-da-capplet.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/capplets/default-applications/mate-da-capplet.c b/capplets/default-applications/mate-da-capplet.c
index a22013dc..26d5e17a 100644
--- a/capplets/default-applications/mate-da-capplet.c
+++ b/capplets/default-applications/mate-da-capplet.c
@@ -290,7 +290,8 @@ refresh_combo_box_icons(GtkIconTheme* theme, GtkComboBox* combo_box, GList* app_
ICONAME_COL, &icon_name,
-1);
- pixbuf = gtk_icon_theme_load_icon(theme, icon_name, 22, 0, NULL);
+ GtkIconInfo* icon_info = gtk_icon_theme_lookup_icon (theme, icon_name, 22, GTK_ICON_LOOKUP_FORCE_SIZE);
+ pixbuf = gtk_icon_info_load_icon(icon_info, NULL);
gtk_list_store_set(GTK_LIST_STORE(model), &iter,
PIXBUF_COL, pixbuf,
@@ -338,7 +339,8 @@ theme_changed_cb(GtkIconTheme* theme, MateDACapplet* capplet)
{
icon = gtk_builder_get_object(capplet->builder, icons[i].name);
- GdkPixbuf* pixbuf = gtk_icon_theme_load_icon(theme, icons[i].icon, 32, 0, NULL);
+ GtkIconInfo* icon_info = gtk_icon_theme_lookup_icon (theme, icons[i].icon, 32, GTK_ICON_LOOKUP_FORCE_SIZE);
+ GdkPixbuf* pixbuf = gtk_icon_info_load_icon(icon_info, NULL);
gtk_image_set_from_pixbuf(GTK_IMAGE(icon), pixbuf);
@@ -453,7 +455,7 @@ fill_combo_box(GtkIconTheme* theme, GtkComboBox* combo_box, GList* app_list, gch
renderer = gtk_cell_renderer_pixbuf_new();
/* Not all cells have a pixbuf, this prevents the combo box to shrink */
- gtk_cell_renderer_set_fixed_size(renderer, -1, 22);
+ gtk_cell_renderer_set_fixed_size(renderer, 22, 22);
gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(combo_box), renderer, FALSE);
gtk_cell_layout_set_attributes(GTK_CELL_LAYOUT(combo_box), renderer,
"pixbuf", PIXBUF_COL,
@@ -484,7 +486,8 @@ fill_combo_box(GtkIconTheme* theme, GtkComboBox* combo_box, GList* app_list, gch
icon_name = g_strdup ("binary");
}
- pixbuf = gtk_icon_theme_load_icon(theme, icon_name, 22, 0, NULL);
+ GtkIconInfo* icon_info = gtk_icon_theme_lookup_icon (theme, icon_name, 22, GTK_ICON_LOOKUP_FORCE_SIZE);
+ pixbuf = gtk_icon_info_load_icon(icon_info, NULL);
gtk_list_store_append(GTK_LIST_STORE(model), &iter);
gtk_list_store_set(GTK_LIST_STORE(model), &iter,