overview: make dash private
The dash object is currently exposed as a public object. It's only used outside of the overview for the dash object's iconSize property though. This commit makes the dash object private and proxies the dash iconSize property to the overview. https://bugzilla.gnome.org/show_bug.cgi?id=657082
This commit is contained in:
parent
80a9d2e7c9
commit
356e4c0967
@ -608,7 +608,7 @@ AppWellIcon.prototype = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
getDragActor: function() {
|
getDragActor: function() {
|
||||||
return this.app.create_icon_texture(Main.overview.dash.iconSize);
|
return this.app.create_icon_texture(Main.overview.dashIconSize);
|
||||||
},
|
},
|
||||||
|
|
||||||
// Returns the original actor that should align with the actor
|
// Returns the original actor that should align with the actor
|
||||||
|
@ -437,6 +437,7 @@ Dash.prototype = {
|
|||||||
|
|
||||||
let oldIconSize = this.iconSize;
|
let oldIconSize = this.iconSize;
|
||||||
this.iconSize = newIconSize;
|
this.iconSize = newIconSize;
|
||||||
|
this.emit('icon-size-changed');
|
||||||
|
|
||||||
let scale = oldIconSize / newIconSize;
|
let scale = oldIconSize / newIconSize;
|
||||||
for (let i = 0; i < iconChildren.length; i++) {
|
for (let i = 0; i < iconChildren.length; i++) {
|
||||||
|
@ -193,14 +193,19 @@ Overview.prototype = {
|
|||||||
this._viewSelector.addSearchProvider(new DocDisplay.DocSearchProvider());
|
this._viewSelector.addSearchProvider(new DocDisplay.DocSearchProvider());
|
||||||
|
|
||||||
// TODO - recalculate everything when desktop size changes
|
// TODO - recalculate everything when desktop size changes
|
||||||
this.dash = new Dash.Dash();
|
this._dash = new Dash.Dash();
|
||||||
this._group.add_actor(this.dash.actor);
|
this._group.add_actor(this._dash.actor);
|
||||||
this.dash.actor.add_constraint(this._viewSelector.constrainY);
|
this._dash.actor.add_constraint(this._viewSelector.constrainY);
|
||||||
this.dash.actor.add_constraint(this._viewSelector.constrainHeight);
|
this._dash.actor.add_constraint(this._viewSelector.constrainHeight);
|
||||||
|
this.dashIconSize = this._dash.iconSize;
|
||||||
|
this._dash.connect('icon-size-changed',
|
||||||
|
Lang.bind(this, function() {
|
||||||
|
this.dashIconSize = this._dash.iconSize;
|
||||||
|
}));
|
||||||
|
|
||||||
// Translators: this is the name of the dock/favorites area on
|
// Translators: this is the name of the dock/favorites area on
|
||||||
// the left of the overview
|
// the left of the overview
|
||||||
Main.ctrlAltTabManager.addGroup(this.dash.actor, _("Dash"), 'user-bookmarks');
|
Main.ctrlAltTabManager.addGroup(this._dash.actor, _("Dash"), 'user-bookmarks');
|
||||||
|
|
||||||
Main.layoutManager.connect('monitors-changed', Lang.bind(this, this._relayout));
|
Main.layoutManager.connect('monitors-changed', Lang.bind(this, this._relayout));
|
||||||
this._relayout();
|
this._relayout();
|
||||||
@ -467,12 +472,12 @@ Overview.prototype = {
|
|||||||
// Set the dash's x position - y is handled by a constraint
|
// Set the dash's x position - y is handled by a constraint
|
||||||
let dashX;
|
let dashX;
|
||||||
if (rtl) {
|
if (rtl) {
|
||||||
this.dash.actor.set_anchor_point_from_gravity(Clutter.Gravity.NORTH_EAST);
|
this._dash.actor.set_anchor_point_from_gravity(Clutter.Gravity.NORTH_EAST);
|
||||||
dashX = primary.width;
|
dashX = primary.width;
|
||||||
} else {
|
} else {
|
||||||
dashX = 0;
|
dashX = 0;
|
||||||
}
|
}
|
||||||
this.dash.actor.set_x(dashX);
|
this._dash.actor.set_x(dashX);
|
||||||
|
|
||||||
this._viewSelector.actor.set_position(viewX, viewY);
|
this._viewSelector.actor.set_position(viewX, viewY);
|
||||||
this._viewSelector.actor.set_size(viewWidth, viewHeight);
|
this._viewSelector.actor.set_size(viewWidth, viewHeight);
|
||||||
|
@ -88,7 +88,7 @@ SearchResult.prototype = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
getDragActor: function(stageX, stageY) {
|
getDragActor: function(stageX, stageY) {
|
||||||
return this.metaInfo['createIcon'](Main.overview.dash.iconSize);
|
return this.metaInfo['createIcon'](Main.overview.dashIconSize);
|
||||||
},
|
},
|
||||||
|
|
||||||
shellWorkspaceLaunch: function(params) {
|
shellWorkspaceLaunch: function(params) {
|
||||||
|
Loading…
Reference in New Issue
Block a user