I have made the following changes intended for : CE:Apps / heliumreborn Please review and accept or decline. BOSS has already run some checks on this request. See the "Messages from BOSS" section below.
https://build.pub.meego.com//request/show/6025 Thank You, mgronbar [This message was auto-generated] --- Request # 6025: Messages from BOSS: State: review at 2012-08-22T16:38:32 by bossbot Reviews: accepted by bossbot : Prechecks succeeded. new for CE-maintainers : Please replace this text with a review and approve/reject the review (not the SR). BOSS will take care of the rest Changes: submit: home:mgronbar:branches:CE:Apps / heliumreborn -> CE:Apps / heliumreborn changes files: -------------- --- heliumreborn.changes +++ heliumreborn.changes @@ -0,0 +1,3 @@ +* Wed Aug 22 2012 Marko Gronbarj <[email protected]> - 1.1.2 +- Fixes NEMO#107: Pinch zoom support added + new: ---- 0001-New-implementation-for-Pinch-zoom.patch spec files: ----------- --- heliumreborn.spec +++ heliumreborn.spec @@ -1,6 +1,6 @@ # # Do NOT Edit the Auto-generated Part! -# Generated by: spectacle version 0.24.1 +# Generated by: spectacle version 0.24 # Name: heliumreborn @@ -20,6 +20,7 @@ Source3: landscape.png Source100: heliumreborn.yaml Patch0: 0001-Fix-NEMO-215-changed-title-to-Browser.patch +Patch1: 0001-New-implementation-for-Pinch-zoom.patch Requires: /usr/bin/update-desktop-database BuildRequires: pkgconfig(QtCore) >= 4.7.0 BuildRequires: pkgconfig(QtOpenGL) @@ -38,6 +39,8 @@ # 0001-Fix-NEMO-215-changed-title-to-Browser.patch %patch0 -p1 +# 0001-New-implementation-for-Pinch-zoom.patch +%patch1 -p1 # >> setup # << setup other changes: -------------- ++++++ 0001-New-implementation-for-Pinch-zoom.patch (new) --- 0001-New-implementation-for-Pinch-zoom.patch +++ 0001-New-implementation-for-Pinch-zoom.patch @@ -0,0 +1,83 @@ +From b752cd02243ad84c30817536f41ead06c44e061e Mon Sep 17 00:00:00 2001 +From: Marko Gronbarj <[email protected]> +Date: Wed, 22 Aug 2012 18:25:50 +0300 +Subject: [PATCH] New implementation for Pinch zoom. + +Fixes NEMO#107 +--- + qml/HeliumReborn/FlickableWebView.qml | 32 ++++++++++++++++++++++++++++++++ + 1 files changed, 32 insertions(+), 0 deletions(-) + +diff --git a/qml/HeliumReborn/FlickableWebView.qml b/qml/HeliumReborn/FlickableWebView.qml +index cac4b6a..36e6fa7 100644 +--- a/qml/HeliumReborn/FlickableWebView.qml ++++ b/qml/HeliumReborn/FlickableWebView.qml +@@ -21,6 +21,7 @@ + */ + + import Qt 4.7 ++import QtQuick 1.1 + import QtWebKit 1.0 + + Flickable { +@@ -58,6 +59,7 @@ Flickable { + webView.contentsScale = width / webView.width * webView.contentsScale; + } + ++ + pressDelay: 200 + // interactive: webView.focus // If the "webView" has focus, then it's flickable + onFocusChanged: { if ( focus ) webView.focus = true; } // Force focus on "webView" when received +@@ -65,6 +67,21 @@ Flickable { + onMovementStarted: webView.renderingEnabled = false; + + onMovementEnded: webView.renderingEnabled = true; ++ PinchArea { ++ id: mapGestures ++ anchors.fill: parent ++ ++ onPinchStarted: { ++ webView.renderingEnabled=false ++ } ++ ++ onPinchUpdated: { ++ webView.doPinchZoom(pinch.scale/pinch.previousScale,pinch.center,pinch.previousCenter) ++ } ++ ++ onPinchFinished: { ++ webView.renderingEnabled=true ++ } + + WebView { + id: webView +@@ -89,6 +106,20 @@ Flickable { + quickZoom.start() + } + } ++ // Calculates new contentX and contentY for flickable and contentsScale for webview ++ function doPinchZoom(zoom,center,centerPrev) ++ { ++ var sc=zoom*contentsScale ++ if(sc>=0.5 && sc<=10 ){ ++ //calculate contentX and contentY so webview moves along with the pinch ++ var vx=(center.x*zoom)-(center.x-flickable.contentX)+(centerPrev.x-center.x) ++ var vy=(center.y*zoom)-(center.y-flickable.contentY)+(centerPrev.y-center.y) ++ flickable.contentX=Math.max(0,Math.min(flickable.contentWidth*zoom-flickable.width,vx)) ++ flickable.contentY=Math.max(0,Math.min(flickable.contentHeight*zoom-flickable.height,vy)) ++ contentsScale=sc ++ } ++ ++ } + + //url:"http://www.connecting.nokia.com/" + url: { +@@ -190,4 +221,5 @@ Flickable { + } + } + } ++ } + } +-- +1.7.6.msysgit.0 + + ++++++ heliumreborn.yaml --- heliumreborn.yaml +++ heliumreborn.yaml @@ -12,6 +12,7 @@ - landscape.png Patches: - 0001-Fix-NEMO-215-changed-title-to-Browser.patch + - 0001-New-implementation-for-Pinch-zoom.patch Description: Helium Mobile browser ported to Qt Quick Components for Nemo Mobile. Configure: none Builder: qmake
