Changeset View
Changeset View
Standalone View
Standalone View
kcms/style/previewitem.cpp
Show First 20 Lines • Show All 289 Lines • ▼ Show 20 Line(s) | 287 | if (w->testAttribute(Qt::WA_Hover)) { | |||
---|---|---|---|---|---|
290 | QApplication::sendEvent(w, &he); | 290 | QApplication::sendEvent(w, &he); | ||
291 | } | 291 | } | ||
292 | } | 292 | } | ||
293 | } | 293 | } | ||
294 | } | 294 | } | ||
295 | 295 | | |||
296 | void PreviewItem::geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry) | 296 | void PreviewItem::geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry) | ||
297 | { | 297 | { | ||
298 | if (!m_widget || newGeometry == oldGeometry) { | 298 | if (m_widget && newGeometry != oldGeometry) { | ||
299 | return; | 299 | m_widget->resize(qRound(newGeometry.width()), qRound(newGeometry.height())); | ||
300 | } | 300 | } | ||
301 | 301 | | |||
302 | m_widget->resize(qRound(newGeometry.width()), qRound(newGeometry.height())); | 302 | QQuickPaintedItem::geometryChanged(newGeometry, oldGeometry); | ||
303 | } | 303 | } | ||
304 | 304 | |