[gnome-shell/eos3.8: 194/255] appDisplay: Set the folder icon geometry through CSS
- From: Matthew Leeds <mwleeds src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/eos3.8: 194/255] appDisplay: Set the folder icon geometry through CSS
- Date: Wed, 10 Jun 2020 19:14:18 +0000 (UTC)
commit ca09cfce0e81499e03b361086b3a0184bbabc6c2
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Fri Apr 3 18:09:09 2020 -0300
appDisplay: Set the folder icon geometry through CSS
The CSS engine is scale-aware, whereas simply setting the
width and height properties directly isn't.
Use CSS to set the folder icon.
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1176
js/ui/appDisplay.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js
index db22205b1f..9ec8e4ffaa 100644
--- a/js/ui/appDisplay.js
+++ b/js/ui/appDisplay.js
@@ -1225,12 +1225,12 @@ class FolderView extends BaseAppView {
});
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._orderedItems.length;
let rtl = icon.get_text_direction() == Clutter.TextDirection.RTL;
for (let i = 0; i < 4; i++) {
- let bin = new St.Bin({ width: subSize * scale, height: subSize * scale });
+ const style = 'width: %dpx; height: %dpx;'.format(subSize, subSize);
+ let bin = new St.Bin({ style });
if (i < numItems)
bin.child = this._orderedItems[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]