Skip to content
Permalink
Browse files
[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:

Canonical link: https://commits.webkit.org/94864@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@106946 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
Allan Sandfeld Jensen authored and webkit-commit-queue committed Feb 7, 2012
1 parent 30234cb commit 46559428c446647d5243d9028782b66b126c7489
Showing 4 changed files with 22 additions and 3 deletions.
@@ -1,3 +1,18 @@
2012-02-07 Allan Sandfeld Jensen <allan.jensen@nokia.com>

[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.

Reviewed by Kenneth Rohde Christiansen.

* MiniBrowser/qt/BrowserWindow.cpp:
(BrowserWindow::updateVisualMockTouchPoints):
* MiniBrowser/qt/MiniBrowserApplication.cpp:
(MiniBrowserApplication::notify):
* MiniBrowser/qt/qml/MockTouchPoint.qml:

2012-02-07 Mario Sanchez Prada <msanchez@igalia.com>

[GTK] Include gdk-pixbuf in the jhbuild modules
@@ -108,12 +108,14 @@ void BrowserWindow::updateVisualMockTouchPoints(const QList<QWindowSystemInterfa
mockTouchPointItem->setParentItem(rootObject());
}

QPointF position = touchPoint.area.topLeft();
QPointF position = touchPoint.area.center();
position.rx() -= geometry().x();
position.ry() -= geometry().y();

mockTouchPointItem->setX(position.x());
mockTouchPointItem->setY(position.y());
mockTouchPointItem->setWidth(touchPoint.area.width());
mockTouchPointItem->setHeight(touchPoint.area.height());
mockTouchPointItem->setProperty("pressed", QVariant(touchPoint.state != Qt::TouchPointReleased));
}
}
@@ -125,7 +125,7 @@ bool MiniBrowserApplication::notify(QObject* target, QEvent* event)
const QMouseEvent* const mouseEvent = static_cast<QMouseEvent*>(event);

QWindowSystemInterface::TouchPoint touchPoint;
touchPoint.area = QRectF(mouseEvent->globalPos(), QSizeF(1, 1));
touchPoint.area = QRectF(mouseEvent->globalPos() - QPointF(30, 40), QSizeF(60, 80));
touchPoint.pressure = 1;

switch (mouseEvent->type()) {
@@ -37,7 +37,9 @@ Item {
source: "../icons/touchpoint.png"
x: -(width / 2)
y: -(height / 2)
opacity: parent.pressed ? 0.8 : 0.0
height: parent.height
width: parent.width
opacity: parent.pressed ? 0.6 : 0.0

Behavior on opacity {
NumberAnimation { duration: 200 }

0 comments on commit 4655942

Please sign in to comment.