[gnome-shell/gbsneto/multiline-on-hover: 4/4] appDisplay: Don't expand title for search results
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/gbsneto/multiline-on-hover: 4/4] appDisplay: Don't expand title for search results
- Date: Wed, 21 Oct 2020 20:24:50 +0000 (UTC)
commit ce421090bbdac3c42393516850baa59e94a0f599
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Wed Oct 21 17:20:59 2020 -0300
appDisplay: Don't expand title for search results
It creates quite a nasty visual inconsistency where the
search results' icon title overflows beneath the next
search section.
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1477
js/ui/appDisplay.js | 18 ++++++++++++------
1 file changed, 12 insertions(+), 6 deletions(-)
---
diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js
index 04e3b4b73e..1020782ad5 100644
--- a/js/ui/appDisplay.js
+++ b/js/ui/appDisplay.js
@@ -1442,16 +1442,19 @@ var AppSearchProvider = class AppSearchProvider {
}
createResultObject(resultMeta) {
- if (resultMeta.id.endsWith('.desktop'))
- return new AppIcon(this._appSys.lookup_app(resultMeta['id']));
- else
+ if (resultMeta.id.endsWith('.desktop')) {
+ return new AppIcon(this._appSys.lookup_app(resultMeta['id']), {
+ expandTitleOnHover: false,
+ });
+ } else {
return new SystemActionIcon(this, resultMeta);
+ }
}
};
var AppViewItem = GObject.registerClass(
class AppViewItem extends St.Button {
- _init(params = {}, isDraggable = true) {
+ _init(params = {}, isDraggable = true, expandTitleOnHover = true) {
super._init({
pivot_point: new Graphene.Point({ x: 0.5, y: 0.5 }),
reactive: true,
@@ -1472,7 +1475,8 @@ class AppViewItem extends St.Button {
this._otherIconIsHovering = false;
this._savedLabelEasingState = false;
- this.connect('notify::hover', this._onHover.bind(this));
+ if (expandTitleOnHover)
+ this.connect('notify::hover', this._onHover.bind(this));
this.connect('destroy', this._onDestroy.bind(this));
}
@@ -2566,8 +2570,10 @@ var AppIcon = GObject.registerClass({
const appIconParams = Params.parse(iconParams, { isDraggable: true }, true);
const isDraggable = appIconParams['isDraggable'];
delete iconParams['isDraggable'];
+ const expandTitleOnHover = appIconParams['expandTitleOnHover'];
+ delete iconParams['expandTitleOnHover'];
- super._init({ style_class: 'app-well-app' }, isDraggable);
+ super._init({ style_class: 'app-well-app' }, isDraggable, expandTitleOnHover);
this.app = app;
this._id = app.get_id();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]