lookingGlass: Use uiGroup as parent instead of panelBox
Currently lookingGlass relies on some odd BoxLayout behavior, which allows children to use fixed positioning without affecting the parent's size request. As this behavior is scheduled for removal, add the looking glass dialog directly to Main.uiGroup. https://bugzilla.gnome.org/show_bug.cgi?id=703808
This commit is contained in:
parent
cb45a38838
commit
11215374ff
@ -849,8 +849,9 @@ const LookingGlass = new Lang.Class({
|
|||||||
this._updateFont();
|
this._updateFont();
|
||||||
|
|
||||||
// We want it to appear to slide out from underneath the panel
|
// We want it to appear to slide out from underneath the panel
|
||||||
Main.layoutManager.panelBox.add_actor(this.actor);
|
Main.uiGroup.add_actor(this.actor);
|
||||||
this.actor.lower_bottom();
|
Main.uiGroup.set_child_below_sibling(this.actor,
|
||||||
|
Main.layoutManager.panelBox);
|
||||||
Main.layoutManager.panelBox.connect('allocation-changed',
|
Main.layoutManager.panelBox.connect('allocation-changed',
|
||||||
Lang.bind(this, this._queueResize));
|
Lang.bind(this, this._queueResize));
|
||||||
Main.layoutManager.keyboardBox.connect('allocation-changed',
|
Main.layoutManager.keyboardBox.connect('allocation-changed',
|
||||||
@ -1072,7 +1073,7 @@ const LookingGlass = new Lang.Class({
|
|||||||
let availableHeight = primary.height - Main.layoutManager.keyboardBox.height;
|
let availableHeight = primary.height - Main.layoutManager.keyboardBox.height;
|
||||||
let myHeight = Math.min(primary.height * 0.7, availableHeight * 0.9);
|
let myHeight = Math.min(primary.height * 0.7, availableHeight * 0.9);
|
||||||
this.actor.x = (primary.width - myWidth) / 2;
|
this.actor.x = (primary.width - myWidth) / 2;
|
||||||
this._hiddenY = this.actor.get_parent().height - myHeight - 4; // -4 to hide the top corners
|
this._hiddenY = Main.layoutManager.panelBox.height - myHeight - 4; // -4 to hide the top corners
|
||||||
this._targetY = this._hiddenY + myHeight;
|
this._targetY = this._hiddenY + myHeight;
|
||||||
this.actor.y = this._hiddenY;
|
this.actor.y = this._hiddenY;
|
||||||
this.actor.width = myWidth;
|
this.actor.width = myWidth;
|
||||||
|
Loading…
Reference in New Issue
Block a user