summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLionel Landwerlin <[email protected]>2017-01-06 15:51:08 +0000
committerlukefromdc <[email protected]>2018-04-04 21:53:21 -0400
commit779e0af4042b6572d729190067cfee6a876d73e5 (patch)
tree659d38436d0825810fed3a61f66bfcd6befadd78
parenta864855c4cb1a9eab4df123d4bedcdad167e3813 (diff)
downloadcaja-779e0af4042b6572d729190067cfee6a876d73e5.tar.bz2
caja-779e0af4042b6572d729190067cfee6a876d73e5.tar.xz
canvas-container: listen to scale factor to invalidate icons
This is one of the condition that needs to trigger an invalidation to recompute layout at the correct size. https://bugzilla.gnome.org/show_bug.cgi?id=776896 origin commit: https://gitlab.gnome.org/GNOME/nautilus/commit/b257699e
-rw-r--r--libcaja-private/caja-icon-container.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/libcaja-private/caja-icon-container.c b/libcaja-private/caja-icon-container.c
index 70671afa..eb13b23f 100644
--- a/libcaja-private/caja-icon-container.c
+++ b/libcaja-private/caja-icon-container.c
@@ -6621,6 +6621,15 @@ handle_focus_out_event (GtkWidget *widget, GdkEventFocus *event, gpointer user_d
return FALSE;
}
+static void
+handle_scale_factor_changed (GObject *object,
+ GParamSpec *pspec,
+ gpointer user_data)
+{
+ invalidate_labels (CAJA_ICON_CONTAINER (object));
+ caja_icon_container_request_update_all (CAJA_ICON_CONTAINER (object));
+}
+
static int text_ellipsis_limits[CAJA_ZOOM_LEVEL_N_ENTRIES];
static int desktop_text_ellipsis_limit;
@@ -6743,6 +6752,9 @@ caja_icon_container_init (CajaIconContainer *container)
g_signal_connect (container, "focus-out-event",
G_CALLBACK (handle_focus_out_event), NULL);
+ g_signal_connect (container, "notify::scale-factor",
+ G_CALLBACK (handle_scale_factor_changed), NULL);
+
eel_background_set_use_base (background, TRUE);
if (!setup_prefs)