Changeset View
Changeset View
Standalone View
Standalone View
src/plasmaquick/dialog.cpp
Show First 20 Lines • Show All 1229 Lines • ▼ Show 20 Line(s) | 1220 | if (geometry().contains(me->screenPos().toPoint()) && !d->mainItemContainsPosition(me->windowPos())) { | |||
---|---|---|---|---|---|
1230 | return true; | 1230 | return true; | ||
1231 | } | 1231 | } | ||
1232 | break; | 1232 | break; | ||
1233 | } | 1233 | } | ||
1234 | 1234 | | |||
1235 | case QEvent::Wheel: { | 1235 | case QEvent::Wheel: { | ||
1236 | QWheelEvent *we = static_cast<QWheelEvent *>(event); | 1236 | QWheelEvent *we = static_cast<QWheelEvent *>(event); | ||
1237 | 1237 | | |||
1238 | if (!d->mainItemContainsPosition(we->pos())) { | 1238 | #if QT_VERSION < QT_VERSION_CHECK(5, 14, 0) | ||
1239 | QWheelEvent we2(d->positionAdjustedForMainItem(we->pos()), | 1239 | const QPoint pos = we->pos(); | ||
1240 | d->positionAdjustedForMainItem(we->pos()) + position(), | 1240 | #else | ||
1241 | const QPoint pos = we->position().toPoint(); | ||||
1242 | #endif | ||||
1243 | | ||||
1244 | if (!d->mainItemContainsPosition(pos)) { | ||||
1245 | #if QT_VERSION < QT_VERSION_CHECK(5, 14, 0) | ||||
1246 | QWheelEvent we2(d->positionAdjustedForMainItem(pos), | ||||
1247 | d->positionAdjustedForMainItem(pos) + position(), | ||||
1241 | we->pixelDelta(), we->angleDelta(), we->angleDelta().y(), | 1248 | we->pixelDelta(), we->angleDelta(), we->angleDelta().y(), | ||
1242 | we->orientation(), we->buttons(), we->modifiers(), we->phase()); | 1249 | we->orientation(), we->buttons(), we->modifiers(), we->phase()); | ||
1250 | #else | ||||
1251 | QWheelEvent we2(d->positionAdjustedForMainItem(pos), | ||||
1252 | d->positionAdjustedForMainItem(pos) + position(), | ||||
1253 | we->pixelDelta(), we->angleDelta(), | ||||
1254 | we->buttons(), we->modifiers(), we->phase(), false /*inverted*/); | ||||
1255 | #endif | ||||
1243 | 1256 | | |||
1244 | if (isVisible()) { | 1257 | if (isVisible()) { | ||
1245 | QCoreApplication::sendEvent(this, &we2); | 1258 | QCoreApplication::sendEvent(this, &we2); | ||
1246 | } | 1259 | } | ||
1247 | return true; | 1260 | return true; | ||
1248 | } | 1261 | } | ||
1249 | break; | 1262 | break; | ||
1250 | } | 1263 | } | ||
▲ Show 20 Lines • Show All 144 Lines • Show Last 20 Lines |