[sushi/wip/cosimoc/no-clutter: 44/67] fallbackRenderer: ellipsize name label
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [sushi/wip/cosimoc/no-clutter: 44/67] fallbackRenderer: ellipsize name label
- Date: Mon, 30 Apr 2018 15:17:20 +0000 (UTC)
commit 2d3c260c3a110f1baac5b4a3802366845b6d4531
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 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/js/ui/fallbackRenderer.js b/src/js/ui/fallbackRenderer.js
index 441dd68..af738a5 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');
@@ -74,7 +74,8 @@ const 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]