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
This commit is contained in:
parent
bc4462cd0c
commit
92f1aec3dd
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user