appDisplay: Animate appIcon for new window of apps
Following design mockups, animate the icons on AllView, FrequentView, Dash and Search to zoom out when opening a new window of the app or when the app is not running and the user execute it. https://bugzilla.gnome.org/show_bug.cgi?id=734726
This commit is contained in:
@ -1699,6 +1699,9 @@ const AppIcon = new Lang.Class({
|
||||
this.app.state == Shell.AppState.RUNNING ||
|
||||
button && button == 2;
|
||||
|
||||
if (this.app.state == Shell.AppState.STOPPED || openNewWindow)
|
||||
this.animateLaunch();
|
||||
|
||||
if (openNewWindow)
|
||||
this.app.open_new_window(-1);
|
||||
else
|
||||
@ -1707,6 +1710,10 @@ const AppIcon = new Lang.Class({
|
||||
Main.overview.hide();
|
||||
},
|
||||
|
||||
animateLaunch: function() {
|
||||
this.icon.animateZoomOut();
|
||||
},
|
||||
|
||||
shellWorkspaceLaunch : function(params) {
|
||||
params = Params.parse(params, { workspace: -1,
|
||||
timestamp: 0 });
|
||||
@ -1788,6 +1795,9 @@ const AppIconMenu = new Lang.Class({
|
||||
if (this._source.app.can_open_new_window()) {
|
||||
this._newWindowMenuItem = this._appendMenuItem(_("New Window"));
|
||||
this._newWindowMenuItem.connect('activate', Lang.bind(this, function() {
|
||||
if (this._source.app.state == Shell.AppState.STOPPED)
|
||||
this._source.animateLaunch();
|
||||
|
||||
this._source.app.open_new_window(-1);
|
||||
this.emit('activate-window', null);
|
||||
}));
|
||||
|
Reference in New Issue
Block a user