[sushi/wip/cosimoc/no-clutter: 20/50] fallbackRenderer: ellipsize name label



commit aa62bc72d16a31cf3af13a329025cc3db623e9b6
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Mon Apr 3 12:20:01 2017 -0700

    fallbackRenderer: ellipsize name label
    
    This could get arbitrarily large.

 src/js/ui/fallbackRenderer.js | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/js/ui/fallbackRenderer.js b/src/js/ui/fallbackRenderer.js
index c00a34c..0f2d84e 100644
--- a/src/js/ui/fallbackRenderer.js
+++ b/src/js/ui/fallbackRenderer.js
@@ -25,7 +25,7 @@
 
 const Gio = imports.gi.Gio;
 const Gtk = imports.gi.Gtk;
-const GtkClutter = imports.gi.GtkClutter;
+const Pango = imports.gi.Pango;
 const Sushi = imports.gi.Sushi;
 
 const Gettext = imports.gettext.domain('sushi');
@@ -73,7 +73,8 @@ var FallbackRenderer = new Lang.Class({
                                  spacing: 6 });
         vbox.pack_start(hbox, false, false, 0);
 
-        this._titleLabel = new Gtk.Label();
+        this._titleLabel = new Gtk.Label({ max_width_chars: 48,
+                                           ellipsize: Pango.EllipsizeMode.MIDDLE });
         this._titleLabel.set_halign(Gtk.Align.START);
         hbox.pack_start(this._titleLabel, false, false, 0);
 


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