[gnome-shell/wip/raresv/uiTweaks: 1/6] search.js: Make the results take more horizontal space



commit 8ca336e81c3ddb76630d36b4c38fbdb007b92689
Author: raresvis <rares visalom gmail com>
Date:   Tue Jun 20 22:13:48 2017 +0300

    search.js: Make the results take more horizontal space
    
    In order to make gnome-shell search functionality fit on
    smaller screens, like those of devices, search results
    need to take advantage of more horizontal space so that
    any extra space can be used efficiently.
    
    In order to do so, change the layout of the ListSearchResult
    class from a vertical one, to a horizontal one and also
    decrease the padding of the list-search-result-content css
    class.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=749957

 data/theme/gnome-shell.css |    5 +++--
 js/ui/search.js            |   12 +++++++-----
 2 files changed, 10 insertions(+), 7 deletions(-)
---
diff --git a/data/theme/gnome-shell.css b/data/theme/gnome-shell.css
index f9e7fd8..8a4c808 100644
--- a/data/theme/gnome-shell.css
+++ b/data/theme/gnome-shell.css
@@ -1180,14 +1180,15 @@ StScrollBar {
 
 .list-search-result-content {
   spacing: 12px;
-  padding: 12px; }
+  padding: 2px; }
 
 .list-search-result-title {
   font-size: 1.5em;
   color: #e2e2df; }
 
 .list-search-result-description {
-  color: #cacac4; }
+  color: #cacac4;
+  margin-left: 30px; }
 
 .search-provider-icon {
   padding: 15px; }
diff --git a/js/ui/search.js b/js/ui/search.js
index 4d29e59..e956bf4 100644
--- a/js/ui/search.js
+++ b/js/ui/search.js
@@ -90,7 +90,7 @@ const ListSearchResult = new Lang.Class({
             content.add(icon);
         }
 
-        let details = new St.BoxLayout({ vertical: true });
+        let details = new St.BoxLayout({ vertical: false });
         content.add(details, { x_fill: true,
                                y_fill: false,
                                x_align: St.Align.START,
@@ -101,16 +101,18 @@ const ListSearchResult = new Lang.Class({
         details.add(title, { x_fill: false,
                              y_fill: false,
                              x_align: St.Align.START,
-                             y_align: St.Align.START });
+                             y_align: St.Align.MIDDLE });
         this.actor.label_actor = title;
 
         if (this.metaInfo['description']) {
-            let description = new St.Label({ style_class: 'list-search-result-description' });
-            description.clutter_text.set_markup(this.metaInfo['description']);
+            let description = new St.Label({
+                                style_class: 'list-search-result-description',
+                                text: this.metaInfo['description'] });
+
             details.add(description, { x_fill: false,
                                        y_fill: false,
                                        x_align: St.Align.START,
-                                       y_align: St.Align.END });
+                                       y_align: St.Align.MIDDLE });
         }
     }
 });


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