[notifications] Make the whole notification clickable
It is not obvious that only the icon is clickable to activate the default action - in fact, with the area being that tiny, many don't even know that notifications can be clicked. Just extend the clickable area to the whole notification. https://bugzilla.gnome.org/show_bug.cgi?id=613932
This commit is contained in:
parent
b237cf9a63
commit
e287aa10e3
@ -99,6 +99,13 @@ Notification.prototype = {
|
|||||||
this.actor = new St.Table({ name: 'notification',
|
this.actor = new St.Table({ name: 'notification',
|
||||||
reactive: true });
|
reactive: true });
|
||||||
this.actor.connect('style-changed', Lang.bind(this, this._styleChanged));
|
this.actor.connect('style-changed', Lang.bind(this, this._styleChanged));
|
||||||
|
this.actor.connect('button-release-event', Lang.bind(this,
|
||||||
|
function (actor, event) {
|
||||||
|
if (!this._actionArea ||
|
||||||
|
!this._actionArea.contains(event.get_source()))
|
||||||
|
this.source.clicked();
|
||||||
|
}));
|
||||||
|
|
||||||
this.update(title, banner, true);
|
this.update(title, banner, true);
|
||||||
|
|
||||||
Main.overview.connect('showing', Lang.bind(this,
|
Main.overview.connect('showing', Lang.bind(this,
|
||||||
@ -136,18 +143,12 @@ Notification.prototype = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this._icon = this.source.createIcon(ICON_SIZE);
|
this._icon = this.source.createIcon(ICON_SIZE);
|
||||||
this._icon.reactive = true;
|
|
||||||
this.actor.add(this._icon, { row: 0,
|
this.actor.add(this._icon, { row: 0,
|
||||||
col: 0,
|
col: 0,
|
||||||
x_expand: false,
|
x_expand: false,
|
||||||
y_expand: false,
|
y_expand: false,
|
||||||
y_fill: false });
|
y_fill: false });
|
||||||
|
|
||||||
this._icon.connect('button-release-event', Lang.bind(this,
|
|
||||||
function () {
|
|
||||||
this.source.clicked();
|
|
||||||
}));
|
|
||||||
|
|
||||||
// The first line should have the title, followed by the
|
// The first line should have the title, followed by the
|
||||||
// banner text, but ellipsized if they won't both fit. We can't
|
// banner text, but ellipsized if they won't both fit. We can't
|
||||||
// make St.Table or St.BoxLayout do this the way we want (don't
|
// make St.Table or St.BoxLayout do this the way we want (don't
|
||||||
|
Loading…
Reference in New Issue
Block a user