AbstractLayerManager: go through QQmlProperty to permit Behavior on animations to take effect

This is needed to easier implement a drop animation that smoothly animates a dropped plasmoid
from its drag position to its position on the desktop grid.
wilder-5.24
Janet Blackquill 4 years ago committed by Fushan Wen
parent 7a99251877
commit b4a3ce684a
  1. 4
      components/containmentlayoutmanager/abstractlayoutmanager.cpp

@ -95,7 +95,9 @@ void AbstractLayoutManager::positionItem(ItemContainer *item)
}
QRectF candidate = candidateGeometry(item);
item->setPosition(candidate.topLeft());
// Use setProperty to allow Behavior on to take effect
item->setProperty("x", candidate.topLeft().x());
item->setProperty("y", candidate.topLeft().y());
item->setSize(candidate.size());
}

Loading…
Cancel
Save