[gnome-shell/gbsneto/fix-long-user-names: 1/3] system: Ellipsize user names
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/gbsneto/fix-long-user-names: 1/3] system: Ellipsize user names
- Date: Thu, 7 Feb 2019 19:57:03 +0000 (UTC)
commit 65cbf4aa458a12211ebd22afedc82ff11fbb3985
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Thu Feb 7 17:51:21 2019 -0200
system: Ellipsize user names
Users may have long user names, (but not too long [1])
so it makes sense to limit how much the label can grow.
Otherwise, the popup may overflow even the biggest
screens.
Ellipsize the user name label.
[1] https://gitlab.gnome.org/GNOME/gnome-control-center/merge_requests/385
js/ui/status/system.js | 2 ++
1 file changed, 2 insertions(+)
---
diff --git a/js/ui/status/system.js b/js/ui/status/system.js
index bbbc44ea1..b4110782e 100644
--- a/js/ui/status/system.js
+++ b/js/ui/status/system.js
@@ -4,6 +4,7 @@ const AccountsService = imports.gi.AccountsService;
const Clutter = imports.gi.Clutter;
const Gio = imports.gi.Gio;
const GLib = imports.gi.GLib;
+const Pango = imports.gi.Pango;
const Shell = imports.gi.Shell;
const St = imports.gi.St;
const GObject = imports.gi.GObject;
@@ -211,6 +212,7 @@ var Indicator = class extends PanelMenu.SystemIndicator {
this._switchUserSubMenu = new PopupMenu.PopupSubMenuMenuItem('', true);
this._switchUserSubMenu.icon.style_class = 'system-switch-user-submenu-icon';
+ this._switchUserSubMenu.label.clutter_text.ellipsize = Pango.EllipsizeMode.END;
// Since the label of the switch user submenu depends on the width of
// the popup menu, and we can't easily connect on allocation-changed
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]