From 756576f0aae76c48348cfa64793f20b1944f7608 Mon Sep 17 00:00:00 2001 From: Pierre Pronchery Date: Fri, 26 Oct 2018 15:56:04 -0300 Subject: [PATCH] Also base the icon height on the font size --- src/desktop/desktop.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/desktop/desktop.c b/src/desktop/desktop.c index 86dec72..39a3eeb 100644 --- a/src/desktop/desktop.c +++ b/src/desktop/desktop.c @@ -719,10 +719,19 @@ GdkPixbuf * desktop_get_folder(Desktop * desktop) void desktop_get_icon_size(Desktop * desktop, unsigned int * width, unsigned int * height, unsigned int * size) { + unsigned int h; + if(width != NULL) *width = desktop->icons_size * 2; if(height != NULL) - *height = desktop->icons_size * 2; + { + h = pango_font_description_get_size(desktop->font); + if(h > 0 && pango_font_description_get_size_is_absolute( + desktop->font)) + *height = desktop->icons_size + (h * 3); + else + *height = desktop->icons_size * 2; + } if(size != NULL) *size = desktop->icons_size; }