[gnome-shell] windowPreview: Make St.Label use single line mode
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] windowPreview: Make St.Label use single line mode
- Date: Wed, 28 Apr 2021 14:37:29 +0000 (UTC)
commit 4e35ca8e269878e110949fb5e9ad6e634364b06f
Author: Leleat <atule pm me>
Date: Fri Apr 23 20:25:07 2021 +0200
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: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1822>
js/ui/windowPreview.js | 1 +
1 file changed, 1 insertion(+)
---
diff --git a/js/ui/windowPreview.js b/js/ui/windowPreview.js
index 84d80fe3ef..e67ec9ec0f 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,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]