summaryrefslogtreecommitdiff
path: root/src/caja-sidebar-title.c
diff options
context:
space:
mode:
authorVictor Kareh <[email protected]>2018-04-04 07:27:14 -0400
committerraveit65 <[email protected]>2018-04-05 09:10:07 +0200
commitce14bef5c36993b13f117d3134abac36825fef9a (patch)
treea4331a34960282790e01468be042c1cb074945a3 /src/caja-sidebar-title.c
parentdade92d4f1edb6f47933e77229801971cb458ef1 (diff)
downloadcaja-ce14bef5c36993b13f117d3134abac36825fef9a.tar.bz2
caja-ce14bef5c36993b13f117d3134abac36825fef9a.tar.xz
sidebar: Respect sidebar dimensions on HiDPI
Diffstat (limited to 'src/caja-sidebar-title.c')
-rw-r--r--src/caja-sidebar-title.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/caja-sidebar-title.c b/src/caja-sidebar-title.c
index 3b257230..2c2cebe1 100644
--- a/src/caja-sidebar-title.c
+++ b/src/caja-sidebar-title.c
@@ -731,9 +731,11 @@ caja_sidebar_title_size_allocate (GtkWidget *widget,
CajaSidebarTitle *sidebar_title;
guint16 old_width;
guint best_icon_size;
+ gint scale;
GtkAllocation old_allocation, new_allocation;
sidebar_title = CAJA_SIDEBAR_TITLE (widget);
+ scale = gtk_widget_get_scale_factor (widget);
gtk_widget_get_allocation (widget, &old_allocation);
old_width = old_allocation.width;
@@ -744,7 +746,7 @@ caja_sidebar_title_size_allocate (GtkWidget *widget,
if (old_width != new_allocation.width)
{
- best_icon_size = get_best_icon_size (sidebar_title);
+ best_icon_size = get_best_icon_size (sidebar_title) / scale;
if (best_icon_size != sidebar_title->details->best_icon_size)
{
sidebar_title->details->best_icon_size = best_icon_size;