From c96194eb986ea02df4fb4f069e022dffe171f489 2017-11-16 13:50:36 From: Thibaud Rabillard Date: 2017-11-16 13:50:36 Subject: [PATCH] show a clock icon during the drag of the TimeWidget --- diff --git a/gui/resources/icones/time.png b/gui/resources/icones/time.png new file mode 100644 index 0000000000000000000000000000000000000000..9fc37044330025630250fcd2ce3184d6216aea15 GIT binary patch literal 3014 zc$@*o3pwxySkqkNC3K%d3 zm<`MVrUO%ek&fzm3wRmW2E0&`1CHuy(g!WTLg1&stH>|Xr|bfL0$fAy7o~|YLx9D= zD&RQ&JH0RI0v-Yu0fU`bqQRI5+zA}Sf9FP(H-Qzv1aqr20P}&T@!yFSQUIO=t~9k! z2FU?SfWP9u(_G1R;Imc+%My!#9r*8{q+}~_wTb0Y&SYRC{yW5%JPCYMZN(Ha0$2(3 z;J*`m%W2>aV7SVnDPjTeI{pnGn(QIt6UE`c&+%{Qkfi|Jjcj&himAw6x^DxgMP5SY zN10$La>(M_sA-dvz!zfJI~WEb`}MvJnRdAg$VarjcSa&h9N)&viadd=oXl}?96TC$ z3Yg}g>?j-uc2~)Mu}(IoTP?*SeLCMDCXSbQ7_S~-Jz zd+b8u9KA9U_osM0$fve5p*C4C0k|Lcj<5|!tAlzNg!`r5v%n{kYLEjiMFK}%+Gs7F z_6b~W@*D)doLp0!k^^o+mT#`?bys4oDY4W@@mjJ5INwlLtv*&W*HI#U~RvX$RyM$!*O$}_ZskNM>>b*03a7wT*O4YgyW^Li}U== z$dxTugy;YOZAfgOwLR~4rSJj=%5K2@GA2|909i&`$3zx@dDe=)5BpEnD&)qGYeIGa z5F4yE(6dtZ0K+VmTxqP}Dw4aH8oC33*uvTg?yypBGPcpX8%XAtUnUI>0AiEh8|Yh> z)4(Mbidl|Pn@N7_GA#}OGAFQ{7_QeUw8&7Iy~t)r(xk}&KvoC)6#7=ng1Cz0usi5^ z2l!N6MU zMBkP-86bPvVuMP02rF(qD-LimHeZ2-m4#LZ6Iz57tw!z$G_hqb@TfsKefDt+Z~~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/TimeWidget.cpp b/gui/src/TimeWidget/TimeWidget.cpp index 050eae3..90cf44e 100644 --- a/gui/src/TimeWidget/TimeWidget.cpp +++ b/gui/src/TimeWidget/TimeWidget.cpp @@ -142,10 +142,8 @@ void TimeWidget::mouseMoveEvent(QMouseEvent *event) drag->setMimeData(mimeData); - auto pixmap = QPixmap(size()); - render(&pixmap); - drag->setPixmap(pixmap); - drag->setHotSpot(impl->m_DragStartPosition); + auto pixmap = QPixmap{":/icones/time.png"}; + drag->setPixmap(pixmap.scaledToWidth(22)); sqpApp->dragDropHelper().resetDragAndDrop();