mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-17 23:24:51 +00:00
magnifier: Remove needless actor
For the pointer clone, we actually have 2 actors (one that contains the sprite, another that moves around). These can just be the same. Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1902>
This commit is contained in:
parent
3df4b5ec7c
commit
c449058d44
1 changed files with 2 additions and 5 deletions
|
|
@ -99,15 +99,12 @@ var Magnifier = class Magnifier {
|
|||
this._mouseSprite = new Clutter.Actor({ request_mode: Clutter.RequestMode.CONTENT_SIZE });
|
||||
this._mouseSprite.content = new MouseSpriteContent();
|
||||
|
||||
this._cursorRoot = new Clutter.Actor();
|
||||
this._cursorRoot.add_actor(this._mouseSprite);
|
||||
|
||||
// Create the first ZoomRegion and initialize it according to the
|
||||
// magnification settings.
|
||||
|
||||
[this.xMouse, this.yMouse] = global.get_pointer();
|
||||
|
||||
let aZoomRegion = new ZoomRegion(this, this._cursorRoot);
|
||||
let aZoomRegion = new ZoomRegion(this, this._mouseSprite);
|
||||
this._zoomRegions.push(aZoomRegion);
|
||||
this._settingsInit(aZoomRegion);
|
||||
aZoomRegion.scrollContentsTo(this.xMouse, this.yMouse);
|
||||
|
|
@ -269,7 +266,7 @@ var Magnifier = class Magnifier {
|
|||
* @returns {ZoomRegion} the newly created ZoomRegion.
|
||||
*/
|
||||
createZoomRegion(xMagFactor, yMagFactor, roi, viewPort) {
|
||||
let zoomRegion = new ZoomRegion(this, this._cursorRoot);
|
||||
let zoomRegion = new ZoomRegion(this, this._mouseSprite);
|
||||
zoomRegion.setViewPort(viewPort);
|
||||
|
||||
// We ignore the redundant width/height on the ROI
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue