Replace anchor point by translation and pivot point
Anchor point is deprecated and will eventually be removed from Mutter's Clutter. Replace them by a combination of pivot point and translation. https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1334
This commit is contained in:
parent
da738988cd
commit
0717f76362
@ -1204,7 +1204,8 @@ class HotCorner extends Clutter.Actor {
|
|||||||
|
|
||||||
if (Clutter.get_default_text_direction() == Clutter.TextDirection.RTL) {
|
if (Clutter.get_default_text_direction() == Clutter.TextDirection.RTL) {
|
||||||
this._corner.set_position(this.width - this._corner.width, 0);
|
this._corner.set_position(this.width - this._corner.width, 0);
|
||||||
this.set_anchor_point_from_gravity(Clutter.Gravity.NORTH_EAST);
|
this.set_pivot_point(1.0, 0.0);
|
||||||
|
this.translation_x = -this.width;
|
||||||
} else {
|
} else {
|
||||||
this._corner.set_position(0, 0);
|
this._corner.set_position(0, 0);
|
||||||
}
|
}
|
||||||
|
@ -489,7 +489,10 @@ var Magnifier = class Magnifier {
|
|||||||
_updateMouseSprite() {
|
_updateMouseSprite() {
|
||||||
this._updateSpriteTexture();
|
this._updateSpriteTexture();
|
||||||
let [xHot, yHot] = this._cursorTracker.get_hot();
|
let [xHot, yHot] = this._cursorTracker.get_hot();
|
||||||
this._mouseSprite.set_anchor_point(xHot, yHot);
|
this._mouseSprite.set({
|
||||||
|
translation_x: -xHot,
|
||||||
|
translation_y: -yHot,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
_updateSpriteTexture() {
|
_updateSpriteTexture() {
|
||||||
|
@ -675,7 +675,7 @@ class PanelCorner extends St.DrawingArea {
|
|||||||
let borderWidth = node.get_length('-panel-corner-border-width');
|
let borderWidth = node.get_length('-panel-corner-border-width');
|
||||||
|
|
||||||
this.set_size(cornerRadius, borderWidth + cornerRadius);
|
this.set_size(cornerRadius, borderWidth + cornerRadius);
|
||||||
this.set_anchor_point(0, borderWidth);
|
this.translation_y = -borderWidth;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user