dnd: Remove pointless scale factor from restore position
Since 629b7394
we don't use the preferred size anymore, but the original
allocation, so this scale factor would always be 1.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1687>
This commit is contained in:
parent
a24a16c5ac
commit
8edfe1dcf6
@ -661,15 +661,9 @@ var _Draggable = class _Draggable {
|
|||||||
if (parentWidth != 0)
|
if (parentWidth != 0)
|
||||||
parentScale = parentScaledWidth / parentWidth;
|
parentScale = parentScaledWidth / parentWidth;
|
||||||
|
|
||||||
// Also adjust for the difference in the original actor width
|
|
||||||
// and the width it is now (children of uiGroup always get
|
|
||||||
// allocated their preferred size)
|
|
||||||
const childScaleX =
|
|
||||||
this._dragOrigWidth / this._dragActor.allocation.get_width();
|
|
||||||
|
|
||||||
x = parentX + parentScale * this._dragOrigX;
|
x = parentX + parentScale * this._dragOrigX;
|
||||||
y = parentY + parentScale * this._dragOrigY;
|
y = parentY + parentScale * this._dragOrigY;
|
||||||
scale = this._dragOrigScale * parentScale * childScaleX;
|
scale = this._dragOrigScale * parentScale;
|
||||||
} else {
|
} else {
|
||||||
// Snap back actor to its original stage position
|
// Snap back actor to its original stage position
|
||||||
x = this._snapBackX;
|
x = this._snapBackX;
|
||||||
|
Loading…
Reference in New Issue
Block a user