From 92f1aec3dd1a373645aa0f70016440993a8ac997 Mon Sep 17 00:00:00 2001 From: Nikita Churaev Date: Sat, 6 Jan 2018 02:54:33 +0300 Subject: [PATCH] appDisplay: Fix small app folder icons when using HIDPI While the scale factor is taken into account for app icons, we set an explicit size when combining the into a folder icon - unless we take the factor into account, the result will be too small on HiDPI displays. https://bugzilla.gnome.org/show_bug.cgi?id=792259 --- js/ui/appDisplay.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js index c309471a0..3b50928b9 100644 --- a/js/ui/appDisplay.js +++ b/js/ui/appDisplay.js @@ -1192,11 +1192,12 @@ var FolderView = new Lang.Class({ style_class: 'app-folder-icon' }); layout.hookup_style(icon); let subSize = Math.floor(FOLDER_SUBICON_FRACTION * size); + let scale = St.ThemeContext.get_for_stage(global.stage).scale_factor; let numItems = this._allItems.length; let rtl = icon.get_text_direction() == Clutter.TextDirection.RTL; for (let i = 0; i < 4; i++) { - let bin = new St.Bin({ width: subSize, height: subSize }); + let bin = new St.Bin({ width: subSize * scale, height: subSize * scale }); if (i < numItems) bin.child = this._allItems[i].app.create_icon_texture(subSize); layout.attach(bin, rtl ? (i + 1) % 2 : i % 2, Math.floor(i / 2), 1, 1);