messageList: Make notification groups expandable/collapsible
This implements the new expand/collapse feature for notification groups
according to the new notification designs [1].
[1] 9e2bed6f37/notifications-calendar/notifications-grouping.png
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3012>
This commit is contained in:

committed by
Marge Bot

parent
dae4179b3d
commit
47de83a922
@ -920,6 +920,18 @@ class DateMenuButton extends PanelMenu.Button {
|
||||
this._messageList = new Calendar.CalendarMessageList();
|
||||
hbox.add_child(this._messageList);
|
||||
|
||||
// Collapse notification groups when the user clicks outside of the expanded group
|
||||
this.menu.actor.connectObject(
|
||||
'captured-event::button', (_, event) => {
|
||||
return this._messageList.maybeCollapseMessageGroupForEvent(event);
|
||||
},
|
||||
'captured-event::touch', (_, event) => {
|
||||
return this._messageList.maybeCollapseMessageGroupForEvent(event);
|
||||
},
|
||||
'captured-event::key', (_, event) => {
|
||||
return this._messageList.maybeCollapseMessageGroupForEvent(event);
|
||||
});
|
||||
|
||||
// Fill up the second column
|
||||
const boxLayout = new CalendarColumnLayout([this._calendar, this._date]);
|
||||
const vbox = new St.Widget({
|
||||
|
Reference in New Issue
Block a user