mirror of
https://gitee.com/drabel/LibQQt.git
synced 2025-01-04 10:18:44 +08:00
update test mouse locker.
This commit is contained in:
parent
86d5bfa6fe
commit
162bafc682
@ -85,25 +85,6 @@
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QMenuBar" name="menuBar">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>633</width>
|
||||
<height>17</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QToolBar" name="mainToolBar">
|
||||
<attribute name="toolBarArea">
|
||||
<enum>TopToolBarArea</enum>
|
||||
</attribute>
|
||||
<attribute name="toolBarBreak">
|
||||
<bool>false</bool>
|
||||
</attribute>
|
||||
</widget>
|
||||
<widget class="QStatusBar" name="statusBar"/>
|
||||
</widget>
|
||||
<layoutdefault spacing="6" margin="11"/>
|
||||
<customwidgets>
|
||||
|
@ -192,13 +192,15 @@ void QQtMouseLockerImpl::mouseMoveEvent ( QMouseEvent* event, QWidget* target )
|
||||
p0 = w.mapToGlobal ( p0 );
|
||||
p1 = w.mapToGlobal ( p1 );
|
||||
|
||||
QRect r0 = QRect ( p0, p1 );
|
||||
mainWinRect.left = ( LONG ) r0.left();
|
||||
mainWinRect.right = ( LONG ) r0.right();
|
||||
mainWinRect.top = ( LONG ) r0.top();
|
||||
mainWinRect.bottom = ( LONG ) r0.bottom();
|
||||
qreal ratio = w.devicePixelRatioF();
|
||||
|
||||
qr0 = r0;
|
||||
QRect r0 = QRect ( p0, p1 );
|
||||
mainWinRect.left = ( LONG ) r0.left() * ratio;
|
||||
mainWinRect.right = ( LONG ) r0.right() * ratio;
|
||||
mainWinRect.top = ( LONG ) r0.top() * ratio;
|
||||
mainWinRect.bottom = ( LONG ) r0.bottom() * ratio;
|
||||
|
||||
qr0 = QRect ( QPoint ( r0.left() * ratio, r0.top() * ratio ), QPoint ( r0.right() * ratio, r0.bottom() * ratio ) );
|
||||
}
|
||||
#endif
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user