window-list: Force single-line window titles

While window titles really really shouldn't contain newline characters,
they are under application control and therefore may very well do.
Force the corresponding labels to be single line, to prevent offending
applications from messing up the whole window list layout.

https://gitlab.gnome.org/GNOME/gnome-shell-extensions/issues/202
This commit is contained in:
Florian Müllner
2020-01-17 15:03:54 +01:00
parent 9c964eaf1b
commit c958e2d0fd
+1
View File
@@ -146,6 +146,7 @@ class WindowTitle extends St.BoxLayout {
this._icon = new St.Bin({ style_class: 'window-button-icon' });
this.add(this._icon);
this.label_actor = new St.Label({ y_align: Clutter.ActorAlign.CENTER });
this.label_actor.clutter_text.single_line_mode = true;
this.add(this.label_actor);
this._textureCache = St.TextureCache.get_default();