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
wilder/Plasma/6.3
Niccolò Venerandi 1 year ago
parent 9c2d1d5090
commit d7acc24093
  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