[gnome-shell] lookingGlass: Fix object inspector for multi-monitor scenarios
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] lookingGlass: Fix object inspector for multi-monitor scenarios
- Date: Sun, 16 Sep 2012 20:38:37 +0000 (UTC)
commit 0d62ec5b0304f5d279ee56a723481a2c98cb845a
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Wed Sep 5 16:23:54 2012 -0300
lookingGlass: Fix object inspector for multi-monitor scenarios
Otherwise the object inspector appears off-screen.
https://bugzilla.gnome.org/show_bug.cgi?id=683982
js/ui/lookingGlass.js | 11 ++++-------
1 files changed, 4 insertions(+), 7 deletions(-)
---
diff --git a/js/ui/lookingGlass.js b/js/ui/lookingGlass.js
index 3173e0d..3c3d094 100644
--- a/js/ui/lookingGlass.js
+++ b/js/ui/lookingGlass.js
@@ -371,7 +371,8 @@ const ObjInspector = new Lang.Class({
this._parentList = [];
- this.actor = new St.ScrollView({ x_fill: true, y_fill: true });
+ this.actor = new St.ScrollView({ pivot_point: new Clutter.Point({ x: 0.5, y: 0.5 }),
+ x_fill: true, y_fill: true });
this.actor.get_hscroll_bar().hide();
this._container = new St.BoxLayout({ name: 'LookingGlassPropertyInspector',
style_class: 'lg-dialog',
@@ -443,10 +444,6 @@ const ObjInspector = new Lang.Class({
this.actor.show();
if (sourceActor) {
this.actor.set_scale(0, 0);
- let [sourceX, sourceY] = sourceActor.get_transformed_position();
- let [sourceWidth, sourceHeight] = sourceActor.get_transformed_size();
- this.actor.move_anchor_point(Math.floor(sourceX + sourceWidth / 2),
- Math.floor(sourceY + sourceHeight / 2));
Tweener.addTween(this.actor, { scale_x: 1, scale_y: 1,
transition: 'easeOutQuad',
time: 0.2 });
@@ -1092,8 +1089,8 @@ const LookingGlass = new Lang.Class({
this.actor.width = myWidth;
this.actor.height = myHeight;
this._objInspector.actor.set_size(Math.floor(myWidth * 0.8), Math.floor(myHeight * 0.8));
- this._objInspector.actor.set_position(this.actor.x + Math.floor(myWidth * 0.1),
- this._targetY + Math.floor(myHeight * 0.1));
+ this._objInspector.actor.set_position(primary.x + this.actor.x + Math.floor(myWidth * 0.1),
+ primary.y + this._targetY + Math.floor(myHeight * 0.1));
},
insertObject: function(obj) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]