[gtk+/wip/matthiasc/icon-size: 10/15] filechooserwidget: icon size is always 16
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/matthiasc/icon-size: 10/15] filechooserwidget: icon size is always 16
- Date: Wed, 15 Nov 2017 04:34:43 +0000 (UTC)
commit aa86a524612f899eca728ee5effebf668c42c45e
Author: Matthias Clasen <mclasen redhat com>
Date: Tue Nov 14 19:48:59 2017 -0500
filechooserwidget: icon size is always 16
gtk/gtkfilechooserwidget.c | 17 ++++-------------
1 files changed, 4 insertions(+), 13 deletions(-)
---
diff --git a/gtk/gtkfilechooserwidget.c b/gtk/gtkfilechooserwidget.c
index d2f9d5f..ee78cb9 100644
--- a/gtk/gtkfilechooserwidget.c
+++ b/gtk/gtkfilechooserwidget.c
@@ -342,7 +342,6 @@ struct _GtkFileChooserWidgetPrivate {
guint location_changed_id;
gulong settings_signal_id;
- int icon_size;
GSource *focus_entry_idle;
@@ -436,8 +435,7 @@ enum {
#define DEFAULT_RECENT_FILES_LIMIT 50
-/* Icon size for if we can't get it from the theme */
-#define FALLBACK_ICON_SIZE 16
+#define ICON_SIZE 16
#define PREVIEW_HBOX_SPACING 12
#define NUM_LINES 45
@@ -2552,8 +2550,8 @@ set_icon_cell_renderer_fixed_size (GtkFileChooserWidget *impl)
gtk_cell_renderer_get_padding (priv->list_pixbuf_renderer, &xpad, &ypad);
gtk_cell_renderer_set_fixed_size (priv->list_pixbuf_renderer,
- xpad * 2 + priv->icon_size,
- ypad * 2 + priv->icon_size);
+ xpad * 2 + ICON_SIZE,
+ ypad * 2 + ICON_SIZE);
}
static gboolean
@@ -3726,15 +3724,9 @@ static void
change_icon_theme (GtkFileChooserWidget *impl)
{
GtkFileChooserWidgetPrivate *priv = impl->priv;
- gint width, height;
profile_start ("start", NULL);
- if (gtk_icon_size_lookup (GTK_ICON_SIZE_MENU, &width, &height))
- priv->icon_size = MAX (width, height);
- else
- priv->icon_size = FALLBACK_ICON_SIZE;
-
/* the first cell in the first column is the icon column, and we have a fixed size there */
set_icon_cell_renderer_fixed_size (impl);
@@ -4956,7 +4948,7 @@ file_system_model_set (GtkFileSystemModel *model,
{
if (g_file_info_has_attribute (info, G_FILE_ATTRIBUTE_STANDARD_ICON))
{
- g_value_take_object (value, _gtk_file_info_get_icon (info, priv->icon_size,
gtk_widget_get_scale_factor (GTK_WIDGET (impl))));
+ g_value_take_object (value, _gtk_file_info_get_icon (info, ICON_SIZE,
gtk_widget_get_scale_factor (GTK_WIDGET (impl))));
}
else
{
@@ -8648,7 +8640,6 @@ gtk_file_chooser_widget_init (GtkFileChooserWidget *impl)
priv->select_multiple = FALSE;
priv->show_hidden = FALSE;
priv->show_size_column = TRUE;
- priv->icon_size = FALLBACK_ICON_SIZE;
priv->load_state = LOAD_EMPTY;
priv->reload_state = RELOAD_EMPTY;
priv->pending_select_files = NULL;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]