diff options
author | Matthias Clasen <mclasen@redhat.com> | 2017-11-14 19:43:13 -0500 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2017-11-15 14:22:17 -0500 |
commit | dbfaa9910705a35d3017f1e8e65a9cf52e2f7d9b (patch) | |
tree | a76a5be1cac5ef746c431a00e8b79a93b63f3e10 /gtk/gtkfilechooserbutton.c | |
parent | 049cc6aa013601c4e662c38df408f8956b155f0a (diff) | |
download | gtk+-dbfaa9910705a35d3017f1e8e65a9cf52e2f7d9b.tar.gz |
image: Remove icon-size argument from icon setters
Instead, add a function gtk_image_set_icon_size() for the cases where
overriding the icon size is necessary.
Treat icon sizes the same way as pixel sizes, too. So gtk_image_clear()
no longer unsets the icon size.
Diffstat (limited to 'gtk/gtkfilechooserbutton.c')
-rw-r--r-- | gtk/gtkfilechooserbutton.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/gtk/gtkfilechooserbutton.c b/gtk/gtkfilechooserbutton.c index ae88e42e17..dfcec5fe5e 100644 --- a/gtk/gtkfilechooserbutton.c +++ b/gtk/gtkfilechooserbutton.c @@ -505,7 +505,7 @@ gtk_file_chooser_button_init (GtkFileChooserButton *button) priv->label = gtk_label_new (_(FALLBACK_DISPLAY_NAME)); gtk_label_set_xalign (GTK_LABEL (priv->label), 0.0f); gtk_widget_set_hexpand (priv->label, TRUE); - icon = gtk_image_new_from_icon_name ("document-open-symbolic", GTK_ICON_SIZE_BUTTON); + icon = gtk_image_new_from_icon_name ("document-open-symbolic"); box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); gtk_widget_set_valign (priv->image, GTK_ALIGN_BASELINE); gtk_container_add (GTK_CONTAINER (box), priv->image); @@ -2481,7 +2481,7 @@ update_label_get_info_cb (GCancellable *cancellable, gtk_label_set_text (GTK_LABEL (priv->label), g_file_info_get_display_name (info)); icon = _gtk_file_info_get_icon (info, priv->icon_size, gtk_widget_get_scale_factor (GTK_WIDGET (button))); - gtk_image_set_from_gicon (GTK_IMAGE (priv->image), icon, GTK_ICON_SIZE_BUTTON); + gtk_image_set_from_gicon (GTK_IMAGE (priv->image), icon); gtk_image_set_pixel_size (GTK_IMAGE (priv->image), priv->icon_size); if (icon) g_object_unref (icon); @@ -2528,7 +2528,7 @@ update_label_and_image (GtkFileChooserButton *button) label_text = _gtk_file_system_volume_get_display_name (volume); icon = _gtk_file_system_volume_get_icon (volume); - gtk_image_set_from_gicon (GTK_IMAGE (priv->image), icon, GTK_ICON_SIZE_BUTTON); + gtk_image_set_from_gicon (GTK_IMAGE (priv->image), icon); gtk_image_set_pixel_size (GTK_IMAGE (priv->image), priv->icon_size); if (icon) g_object_unref (icon); @@ -2560,7 +2560,7 @@ update_label_and_image (GtkFileChooserButton *button) label_text = _gtk_bookmarks_manager_get_bookmark_label (button->priv->bookmarks_manager, file); icon = g_themed_icon_new ("text-x-generic"); - gtk_image_set_from_gicon (GTK_IMAGE (priv->image), icon, GTK_ICON_SIZE_BUTTON); + gtk_image_set_from_gicon (GTK_IMAGE (priv->image), icon); gtk_image_set_pixel_size (GTK_IMAGE (priv->image), priv->icon_size); if (icon) g_object_unref (icon); @@ -2587,7 +2587,7 @@ out: else { gtk_label_set_text (GTK_LABEL (priv->label), _(FALLBACK_DISPLAY_NAME)); - gtk_image_set_from_gicon (GTK_IMAGE (priv->image), NULL, priv->icon_size); + gtk_image_set_from_gicon (GTK_IMAGE (priv->image), NULL); } if (done_changing_selection) |