[gnome-shell/31-fix-hdpi-folder-icons: 14/14] appDisplay: Fix small app folder icons when using HIDPI
- From: Florian MĂźllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/31-fix-hdpi-folder-icons: 14/14] appDisplay: Fix small app folder icons when using HIDPI
- Date: Sat, 10 Feb 2018 00:41:23 +0000 (UTC)
commit 92f1aec3dd1a373645aa0f70016440993a8ac997
Author: Nikita Churaev <lamefun x0r gmail com>
Date: Sat Jan 6 02:54:33 2018 +0300
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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]