Update ExpoCell contentItem position upon its parent change

Since the position of the contentItem depends on the position and scale
of the parent item, make sure to re-evaluate it when the parent changes.

BUG:495501


(cherry picked from commit d7acc24093)

Co-authored-by: Niccolò Venerandi <niccolo@venerandi.com>
wilder/Plasma/6.2
Niccolò Venerandi 1 year ago
parent 0572e43303
commit 1dbe3863a7
  1. 6
      src/plugins/private/expolayout.cpp

@ -100,8 +100,14 @@ void ExpoCell::setContentItem(QQuickItem *item)
return;
}
if (m_contentItem) {
disconnect(m_contentItem, &QQuickItem::parentChanged, this, &ExpoCell::updateContentItemGeometry);
}
m_contentItem = item;
connect(m_contentItem, &QQuickItem::parentChanged, this, &ExpoCell::updateContentItemGeometry);
if (m_contentItem) {
m_contentItem->setVisible(isVisible());
}

Loading…
Cancel
Save