[gnome-shell/T29763: 88/249] appDisplay: Define fixed size of the icons via SCSS



commit 0836040d15ce2cb9b35955a95874abe97d42c72c
Author: Mario Sanchez Prada <mario endlessm com>
Date:   Wed Feb 7 15:43:41 2018 +0000

    appDisplay: Define fixed size of the icons via SCSS
    
    The upstream shell calculates the size of the icons dynamically depending
    on the available size of the screen, but we don't want that so we better
    disable the manual mode to set the icons' sizes so we can use CSS.
    
    https://phabricator.endlessm.com/T17658

 data/theme/gnome-shell-sass/_endless.scss | 20 ++++++++++++++++++++
 js/ui/appDisplay.js                       |  4 ++--
 2 files changed, 22 insertions(+), 2 deletions(-)
---
diff --git a/data/theme/gnome-shell-sass/_endless.scss b/data/theme/gnome-shell-sass/_endless.scss
index 4b9a53447d..6becdfa9c1 100644
--- a/data/theme/gnome-shell-sass/_endless.scss
+++ b/data/theme/gnome-shell-sass/_endless.scss
@@ -387,3 +387,23 @@ popup-separator-menu-item {
         background-image: url("resource:///org/gnome/shell/theme/discovery-feed-tile-hover.png");
     }
 }
+
+// Icon Grid
+
+%overview-icon {
+    width: 118px;
+    height: 118px;
+    icon-size: 64px;
+    spacing: 4px;
+    padding: 6px 0 6px 0;
+    padding-bottom: 0px;
+    border-radius: 15px;
+    font-weight: bold;
+    text-align: center;
+}
+
+.icon-grid {
+    .overview-icon {
+         @extend %overview-icon;
+    }
+}
diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js
index 97179de56c..bc2ba87759 100644
--- a/js/ui/appDisplay.js
+++ b/js/ui/appDisplay.js
@@ -1175,7 +1175,7 @@ var FolderIcon = GObject.registerClass({
 
         this.icon = new IconGrid.BaseIcon('', {
             createIcon: this._createIcon.bind(this),
-            setSizeManually: true,
+            setSizeManually: false,
         });
         this.set_child(this.icon);
         this.label_actor = this.icon.label;
@@ -1711,7 +1711,7 @@ var AppIcon = GObject.registerClass({
         delete iconParams['isDraggable'];
 
         iconParams['createIcon'] = this._createIcon.bind(this);
-        iconParams['setSizeManually'] = true;
+        iconParams['setSizeManually'] = false;
         this.icon = new IconGrid.BaseIcon(app.get_name(), iconParams);
         this._iconContainer.add_child(this.icon);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]