[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [krita] krita/ui/input/wintab: Fix Wintab scaling to support QT_SCALE_FACTOR
From:       Michael Abrahams <miabraha () gmail ! com>
Date:       2015-12-31 20:21:18
Message-ID: E1aEjio-0002Bu-WA () scm ! kde ! org
[Download RAW message or body]

Git commit 4bedfc347f20863f206916186d8e87bc32c0385c by Michael Abrahams.
Committed on 31/12/2015 at 20:21.
Pushed by abrahams into branch 'master'.

Fix Wintab scaling to support QT_SCALE_FACTOR

M  +1    -6    krita/ui/input/wintab/kis_tablet_support_win.cpp

http://commits.kde.org/krita/4bedfc347f20863f206916186d8e87bc32c0385c

diff --git a/krita/ui/input/wintab/kis_tablet_support_win.cpp \
b/krita/ui/input/wintab/kis_tablet_support_win.cpp index 2e7f2b9..c732f62 100644
--- a/krita/ui/input/wintab/kis_tablet_support_win.cpp
+++ b/krita/ui/input/wintab/kis_tablet_support_win.cpp
@@ -758,7 +758,7 @@ bool QWindowsTabletSupport::translateTabletPacketEvent()
         const int z = currentDevice == QTabletEvent::FourDMouse ? int(packet.pkZ) : \
0;  
         // This code is to delay the tablet data one cycle to sync with the mouse \
                location.
-        QPointF globalPosF = m_oldGlobalPosF;
+        QPointF globalPosF = m_oldGlobalPosF / dpr; // Convert from "native" to \
                "device independent pixels."
         m_oldGlobalPosF = tabletData.scaleCoordinates(packet.pkX, packet.pkY, \
virtualDesktopArea);  
         QPoint globalPos = globalPosF.toPoint();
@@ -818,11 +818,6 @@ bool QWindowsTabletSupport::translateTabletPacketEvent()
                 << tiltY << "tanP:" << tangentialPressure << "rotation:" << \
rotation;  }
 
-        // Convert from "native" to "device independent pixels"
-        const QPointF localPosDip = localPosF / dpr;
-        const QPointF globalPosDip = globalPosF / dpr;
-
-
         // Reusable helper function. Better than compiler macros!
         auto sendTabletEvent = [&](QTabletEvent::Type t){
             handleTabletEvent(w, localPosDip, globalPosDip, currentDevice, \
currentPointerType,


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic