From 4e35ca8e269878e110949fb5e9ad6e634364b06f Mon Sep 17 00:00:00 2001 From: Leleat Date: Fri, 23 Apr 2021 20:25:07 +0200 Subject: [PATCH] windowPreview: Make St.Label use single line mode When a windowPreview is hovered or selected, it will show its window's title as a caption. That title may contain Newline characters which will effect the windowPreview size. Make the caption's St.Label use single line mode to prevent that. Fixes https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/4162 Part-of: --- js/ui/windowPreview.js | 1 + 1 file changed, 1 insertion(+) diff --git a/js/ui/windowPreview.js b/js/ui/windowPreview.js index 84d80fe3e..e67ec9ec0 100644 --- a/js/ui/windowPreview.js +++ b/js/ui/windowPreview.js @@ -151,6 +151,7 @@ var WindowPreview = GObject.registerClass({ text: this._getCaption(), reactive: true, }); + this._title.clutter_text.single_line_mode = true; this._title.add_constraint(new Clutter.BindConstraint({ source: windowContainer, coordinate: Clutter.BindCoordinate.X,