Title: [102941] trunk/Tools
Revision
102941
Author
[email protected]
Date
2011-12-15 08:40:41 -0800 (Thu, 15 Dec 2011)

Log Message

[Qt] Improve the look of the viewport info overlay

Reviewed by Tor Arne Vestbø.

* MiniBrowser/qt/qml/ViewportInfoItem.qml:

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (102940 => 102941)


--- trunk/Tools/ChangeLog	2011-12-15 16:40:19 UTC (rev 102940)
+++ trunk/Tools/ChangeLog	2011-12-15 16:40:41 UTC (rev 102941)
@@ -1,3 +1,11 @@
+2011-12-15  Kenneth Rohde Christiansen  <[email protected]>
+
+        [Qt] Improve the look of the viewport info overlay
+
+        Reviewed by Tor Arne Vestbø.
+
+        * MiniBrowser/qt/qml/ViewportInfoItem.qml:
+
 2011-12-15  Igor Oliveira  <[email protected]>
 
         [Qt] Support requestAnimationFrame API

Modified: trunk/Tools/MiniBrowser/qt/qml/ViewportInfoItem.qml (102940 => 102941)


--- trunk/Tools/MiniBrowser/qt/qml/ViewportInfoItem.qml	2011-12-15 16:40:19 UTC (rev 102940)
+++ trunk/Tools/MiniBrowser/qt/qml/ViewportInfoItem.qml	2011-12-15 16:40:41 UTC (rev 102941)
@@ -7,57 +7,78 @@
     color: "black"
     opacity: 0.8
 
-    Text {
-        id: viewportInfoLabel
-        text: "Viewport Info"
-        color: "white"
+    Item {
+        anchors.fill: parent
+        anchors.margins: 20
+
+        property string fontFamily: "Nokia Pure, Helvetica"
+        property color fontColor: "white"
+
+        Text {
+            id: viewportInfoLabel
+            text: "Viewport Info"
+            color: "white"
+            font.family: "Nokia Pure, Helvetica"
+            font.pointSize: 24
+        }
+        Text {
+            id: currentScaleLabel
+            anchors.top: viewportInfoLabel.bottom
+            anchors.topMargin: 30
+            text: "Current scale: " + parseFloat(viewportInfo.currentScale.toFixed(4))
+            font.family: parent.fontFamily
+            color: parent.fontColor
+        }
+        Text {
+            id: initialScaleLabel
+            anchors.top: currentScaleLabel.bottom
+            text: "Initial scale: " + parseFloat(viewportInfo.initialScale.toFixed(4))
+            font.family: parent.fontFamily
+            color: parent.fontColor
+        }
+        Text {
+            id: minimumScaleLabel
+            anchors.top: initialScaleLabel.bottom
+            text: "Minimum scale: " + parseFloat(viewportInfo.minimumScale.toFixed(4))
+            font.family: parent.fontFamily
+            color: parent.fontColor
+        }
+        Text {
+            id: maximumScaleLabel
+            anchors.top: minimumScaleLabel.bottom
+            text: "Maximum scale: " + parseFloat(viewportInfo.maximumScale.toFixed(4))
+            font.family: parent.fontFamily
+            color: parent.fontColor
+        }
+        Text {
+            id: devicePixelRatioLabel
+            anchors.top: maximumScaleLabel.bottom
+            anchors.topMargin: 30
+            text: "Device pixel ratio: " + parseFloat(viewportInfo.devicePixelRatio.toFixed(4))
+            font.family: parent.fontFamily
+            color: parent.fontColor
+        }
+        Text {
+            id: contentsSizeLabel
+            anchors.top: devicePixelRatioLabel.bottom
+            text: "Contents size: " + viewportInfo.contentsSize.width + "x" + viewportInfo.contentsSize.height
+            font.family: parent.fontFamily
+            color: parent.fontColor
+        }
+        Text {
+            id: layoutSizeLabel
+            anchors.top: contentsSizeLabel.bottom
+            text: "Viewport layout size: " + viewportInfo.layoutSize.width + "x" + viewportInfo.layoutSize.height
+            font.family: parent.fontFamily
+            color: parent.fontColor
+        }
+        Text {
+            id: scalableLabel
+            anchors.top: layoutSizeLabel.bottom
+            anchors.topMargin: 30
+            text: "View " + (viewportInfo.isScalable ? "is " : "is not " ) + "scalable."
+            font.family: parent.fontFamily
+            color: parent.fontColor
+        }
     }
-    Text {
-        id: currentScaleLabel
-        anchors.top: viewportInfoLabel.bottom
-        text: "Current scale: " + viewportInfo.currentScale
-        color: "white"
-    }
-    Text {
-        id: initialScaleLabel
-        anchors.top: currentScaleLabel.bottom
-        text: "Initial scale: " + viewportInfo.initialScale
-        color: "white"
-    }
-    Text {
-        id: minimumScaleLabel
-        anchors.top: initialScaleLabel.bottom
-        text: "Minimum scale: " + viewportInfo.minimumScale
-        color: "white"
-    }
-    Text {
-        id: maximumScaleLabel
-        anchors.top: minimumScaleLabel.bottom
-        text: "Maximum scale: " + viewportInfo.maximumScale
-        color: "white"
-    }
-    Text {
-        id: devicePixelRatioLabel
-        anchors.top: maximumScaleLabel.bottom
-        text: "Device pixel ration: " + viewportInfo.devicePixelRatio
-        color: "white"
-    }
-    Text {
-        id: contentsSizeLabel
-        anchors.top: devicePixelRatioLabel.bottom
-        text: "Contents size: (" + viewportInfo.contentsSize.width + "x" + viewportInfo.contentsSize.height + ")"
-        color: "white"
-    }
-    Text {
-        id: layoutSizeLabel
-        anchors.top: contentsSizeLabel.bottom
-        text: "Viewport layout size: (" + viewportInfo.layoutSize.width + "x" + viewportInfo.layoutSize.height + ")"
-        color: "white"
-    }
-    Text {
-        id: scalableLabel
-        anchors.top: layoutSizeLabel.bottom
-        text: "View " + (viewportInfo.isScalable ? "is " : "is not " ) + "scalable."
-        color: "white"
-    }
 }
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to