diff options
author | Victor Kareh <[email protected]> | 2018-03-29 16:09:16 -0400 |
---|---|---|
committer | raveit65 <[email protected]> | 2018-04-05 09:08:43 +0200 |
commit | 1a14801e9e24139efd5bff2a351405fd05d44096 (patch) | |
tree | e45d017bb1a88502acd70494bafff05d1888d86b /src/file-manager/fm-desktop-icon-view.c | |
parent | 4c377bad72d5c873999c09fcbc8a2ac6aa76d4d6 (diff) | |
download | caja-1a14801e9e24139efd5bff2a351405fd05d44096.tar.bz2 caja-1a14801e9e24139efd5bff2a351405fd05d44096.tar.xz |
Scale screen dimensions
Diffstat (limited to 'src/file-manager/fm-desktop-icon-view.c')
-rw-r--r-- | src/file-manager/fm-desktop-icon-view.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/file-manager/fm-desktop-icon-view.c b/src/file-manager/fm-desktop-icon-view.c index 8cbf0b62..42186a70 100644 --- a/src/file-manager/fm-desktop-icon-view.c +++ b/src/file-manager/fm-desktop-icon-view.c @@ -392,10 +392,12 @@ realized_callback (GtkWidget *widget, FMDesktopIconView *desktop_icon_view) GdkWindow *root_window; GdkScreen *screen; GtkAllocation allocation; + gint scale; g_return_if_fail (desktop_icon_view->details->root_window == NULL); screen = gtk_widget_get_screen (widget); + scale = gtk_widget_get_scale_factor (widget); /* Ugly HACK for the problem that the views realize at the * wrong size and then get resized. (This is a problem with @@ -405,8 +407,8 @@ realized_callback (GtkWidget *widget, FMDesktopIconView *desktop_icon_view) */ allocation.x = 0; allocation.y = 0; - allocation.width = WidthOfScreen (gdk_x11_screen_get_xscreen (screen)); - allocation.height = HeightOfScreen (gdk_x11_screen_get_xscreen (screen)); + allocation.width = WidthOfScreen (gdk_x11_screen_get_xscreen (screen)) / scale; + allocation.height = HeightOfScreen (gdk_x11_screen_get_xscreen (screen)) / scale; gtk_widget_size_allocate (GTK_WIDGET(get_icon_container(desktop_icon_view)), &allocation); |