Changeset 106946 in webkit


Ignore:
Timestamp:
Feb 7, 2012 8:09:43 AM (12 years ago)
Author:
commit-queue@webkit.org
Message:

[Qt] Give emulated touch-point a radius
https://bugs.webkit.org/show_bug.cgi?id=77985

Increase the radius of touch-point and show the actual size of the touch point in the touch-point mockup.

Patch by Allan Sandfeld Jensen <allan.jensen@nokia.com> on 2012-02-07
Reviewed by Kenneth Rohde Christiansen.

  • MiniBrowser/qt/BrowserWindow.cpp:

(BrowserWindow::updateVisualMockTouchPoints):

  • MiniBrowser/qt/MiniBrowserApplication.cpp:

(MiniBrowserApplication::notify):

  • MiniBrowser/qt/qml/MockTouchPoint.qml:
Location:
trunk/Tools
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r106936 r106946  
     12012-02-07  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
     2
     3        [Qt] Give emulated touch-point a radius
     4        https://bugs.webkit.org/show_bug.cgi?id=77985
     5       
     6        Increase the radius of touch-point and show the actual size of the touch point in the touch-point mockup.
     7
     8        Reviewed by Kenneth Rohde Christiansen.
     9
     10        * MiniBrowser/qt/BrowserWindow.cpp:
     11        (BrowserWindow::updateVisualMockTouchPoints):
     12        * MiniBrowser/qt/MiniBrowserApplication.cpp:
     13        (MiniBrowserApplication::notify):
     14        * MiniBrowser/qt/qml/MockTouchPoint.qml:
     15
    1162012-02-07  Mario Sanchez Prada  <msanchez@igalia.com>
    217
  • trunk/Tools/MiniBrowser/qt/BrowserWindow.cpp

    r106658 r106946  
    109109        }
    110110
    111         QPointF position = touchPoint.area.topLeft();
     111        QPointF position = touchPoint.area.center();
    112112        position.rx() -= geometry().x();
    113113        position.ry() -= geometry().y();
     
    115115        mockTouchPointItem->setX(position.x());
    116116        mockTouchPointItem->setY(position.y());
     117        mockTouchPointItem->setWidth(touchPoint.area.width());
     118        mockTouchPointItem->setHeight(touchPoint.area.height());
    117119        mockTouchPointItem->setProperty("pressed", QVariant(touchPoint.state != Qt::TouchPointReleased));
    118120    }
  • trunk/Tools/MiniBrowser/qt/MiniBrowserApplication.cpp

    r106658 r106946  
    126126
    127127        QWindowSystemInterface::TouchPoint touchPoint;
    128         touchPoint.area = QRectF(mouseEvent->globalPos(), QSizeF(1, 1));
     128        touchPoint.area = QRectF(mouseEvent->globalPos() - QPointF(30, 40), QSizeF(60, 80));
    129129        touchPoint.pressure = 1;
    130130
  • trunk/Tools/MiniBrowser/qt/qml/MockTouchPoint.qml

    r102381 r106946  
    3838        x: -(width / 2)
    3939        y: -(height / 2)
    40         opacity: parent.pressed ? 0.8 : 0.0
     40        height: parent.height
     41        width: parent.width
     42        opacity: parent.pressed ? 0.6 : 0.0
    4143
    4244        Behavior on opacity {
Note: See TracChangeset for help on using the changeset viewer.