Added toolbar images
authorYves Marcoz <yves@marcoz.org>
Sun, 7 Nov 2010 17:46:08 +0000 (09:46 -0800)
committerYves Marcoz <yves@marcoz.org>
Sun, 7 Nov 2010 17:46:08 +0000 (09:46 -0800)
src/qml/ArticleDisplay.qml [new file with mode: 0644]
src/qml/common/images/.directory [new file with mode: 0644]
src/qml/common/images/InputMethodShiftButtonNormal.png [new file with mode: 0644]
src/qml/common/images/Zoom-In-icon.png [new file with mode: 0644]
src/qml/common/images/checkmark.png [new file with mode: 0644]
src/qml/common/images/rotate.png [new file with mode: 0644]
src/qml/common/images/wmBackIcon.png [new file with mode: 0644]
src/qml/common/images/wmCloseIcon.png [new file with mode: 0644]
src/qml/common/images/wmEditIcon.png [new file with mode: 0644]
src/qml/common/images/wmTaskLauncherIcon.png [new file with mode: 0644]

diff --git a/src/qml/ArticleDisplay.qml b/src/qml/ArticleDisplay.qml
new file mode 100644 (file)
index 0000000..4c3deec
--- /dev/null
@@ -0,0 +1,66 @@
+import Qt 4.7
+import QtWebKit 1.0
+import "common" as Common
+
+Rectangle {
+    /*x: parent.width; height: parent.height;*/
+    width: parent.width;
+    height: parent.height
+    property alias zoomEnabled: slider.visible;
+    property alias value: slider.value;
+    //anchors.top: parent.top; anchors.bottom: parent.bottom;
+    color: "white";
+
+    Flickable {
+        id: flickable
+        //anchors.fill: screen;
+        height: parent.height;
+        width: parent.width;
+        contentWidth: webView.width*webView.scale; //Math.max(screen.width,webView.width*webView.scale)
+        contentHeight: Math.max(articleViewer.height,webView.height*webView.scale)
+        //contentWidth: childrenRect.width; contentHeight: childrenRect.height
+        interactive: parent.vertPanningEnabled;
+
+        flickDeceleration: 1500;
+        flickableDirection: Flickable.VerticalFlick
+        WebView {
+            id: webView
+            url: flipItem.url;
+            preferredWidth: flickable.width
+            preferredHeight: flickable.height
+            //scale: 1.25;
+            transformOrigin: Item.TopLeft
+            scale: slider.value;
+            settings.defaultFontSize: 24
+        }
+
+//        onFlickStarted: {
+//            console.log("start contentx"+contentX)
+//            console.log("start contenty"+contentY)
+//        }
+    }
+
+    Common.Slider {
+        id: slider; visible: false
+        minimum: 0.2;
+        maximum: 2;
+        property real prevScale: 1
+        anchors {
+            bottom: parent.bottom; bottomMargin: 65
+            left: parent.left; leftMargin: 25
+            right: parent.right; rightMargin: 25
+        }
+        onValueChanged: {
+            if (webView.width * value > flickable.width) {
+                var xoff = (flickable.width/2 + flickable.contentX) * value / prevScale;
+                flickable.contentX = xoff - flickable.width/2;
+            }
+            if (webView.height * value > flickable.height) {
+                var yoff = (flickable.height/2 + flickable.contentY) * value / prevScale;
+                flickable.contentY = yoff - flickable.height/2;
+            }
+            prevScale = value;
+        }
+        Component.onCompleted: {value=0; value=1; }
+    }
+}
diff --git a/src/qml/common/images/.directory b/src/qml/common/images/.directory
new file mode 100644 (file)
index 0000000..2753324
--- /dev/null
@@ -0,0 +1,3 @@
+[Dolphin]
+ShowPreview=true
+Timestamp=2010,11,7,0,33,30
diff --git a/src/qml/common/images/InputMethodShiftButtonNormal.png b/src/qml/common/images/InputMethodShiftButtonNormal.png
new file mode 100644 (file)
index 0000000..663d0e0
Binary files /dev/null and b/src/qml/common/images/InputMethodShiftButtonNormal.png differ
diff --git a/src/qml/common/images/Zoom-In-icon.png b/src/qml/common/images/Zoom-In-icon.png
new file mode 100644 (file)
index 0000000..3a24ac5
Binary files /dev/null and b/src/qml/common/images/Zoom-In-icon.png differ
diff --git a/src/qml/common/images/checkmark.png b/src/qml/common/images/checkmark.png
new file mode 100644 (file)
index 0000000..84c1335
Binary files /dev/null and b/src/qml/common/images/checkmark.png differ
diff --git a/src/qml/common/images/rotate.png b/src/qml/common/images/rotate.png
new file mode 100644 (file)
index 0000000..2a62e93
Binary files /dev/null and b/src/qml/common/images/rotate.png differ
diff --git a/src/qml/common/images/wmBackIcon.png b/src/qml/common/images/wmBackIcon.png
new file mode 100644 (file)
index 0000000..c9a5de5
Binary files /dev/null and b/src/qml/common/images/wmBackIcon.png differ
diff --git a/src/qml/common/images/wmCloseIcon.png b/src/qml/common/images/wmCloseIcon.png
new file mode 100644 (file)
index 0000000..41c533f
Binary files /dev/null and b/src/qml/common/images/wmCloseIcon.png differ
diff --git a/src/qml/common/images/wmEditIcon.png b/src/qml/common/images/wmEditIcon.png
new file mode 100644 (file)
index 0000000..12fae74
Binary files /dev/null and b/src/qml/common/images/wmEditIcon.png differ
diff --git a/src/qml/common/images/wmTaskLauncherIcon.png b/src/qml/common/images/wmTaskLauncherIcon.png
new file mode 100644 (file)
index 0000000..87029c3
Binary files /dev/null and b/src/qml/common/images/wmTaskLauncherIcon.png differ