Bug 2644 - phonegap example : Orientation preview support
authorEugene Ostroukhov <eugeneo@symbian.org>
Thu, 20 May 2010 13:14:48 -0700
changeset 338 41174f0a7f7c
parent 337 afe6a53c0ed4
child 339 0a90f9744515
Bug 2644 - phonegap example : Orientation preview support
org.symbian.tools.wrttools.previewer/preview/css/style.css
org.symbian.tools.wrttools.previewer/preview/images/rotate-left.png
org.symbian.tools.wrttools.previewer/preview/images/rotate-right.png
org.symbian.tools.wrttools.previewer/preview/script/nokia.js
org.symbian.tools.wrttools.previewer/preview/wrt_preview.html
--- a/org.symbian.tools.wrttools.previewer/preview/css/style.css	Wed May 19 17:17:31 2010 -0700
+++ b/org.symbian.tools.wrttools.previewer/preview/css/style.css	Thu May 20 13:14:48 2010 -0700
@@ -286,8 +286,6 @@
 	margin: 0px;
 }
 
-
-
 p.highlight span{
 	background-color: #fbf7a2;
 	font-weight: normal;
@@ -312,20 +310,25 @@
 	height: 32px;
 	width: 32px;
 	cursor: pointer;
+	opacity: 0.8;
 }
 
 /*
 	preferences CSS
 */
-
 div#TopToolbar{
-	background-color: olive;
-	position: absolute;
-	left: 85px;
-	right: 85px;
+	left: 20%;
+	right: 20%;
+	background-color: gray;
+	opacity: 0.7;
 	top: 0;
 	height: 32px;
 	text-align: center;
+	min-width: 150px;
+	position: absolute;
+}
+div#TopToolbar:hover{
+	opacity: 0.9;
 }
 
 div#PreferencesBtn{
Binary file org.symbian.tools.wrttools.previewer/preview/images/rotate-left.png has changed
Binary file org.symbian.tools.wrttools.previewer/preview/images/rotate-right.png has changed
--- a/org.symbian.tools.wrttools.previewer/preview/script/nokia.js	Wed May 19 17:17:31 2010 -0700
+++ b/org.symbian.tools.wrttools.previewer/preview/script/nokia.js	Thu May 20 13:14:48 2010 -0700
@@ -556,7 +556,17 @@
 		render : function()
 		{
 			this.load();
-			
+			//	Selecting Resoltion
+			var resOptions = $("#resOptions")[0];
+			for(var i=0; i<NOKIA.resolution.length; i++)
+			{
+				if(NOKIA.resolution[i] == NOKIA.currentDevice)
+				{
+					resOptions.options[i].selected = true;
+					break;
+				}				
+			}
+
 			if(!NOKIA.emulator.orientationSupports())
 				NOKIA.mode = NOKIA.deviceList[NOKIA.currentDevice]['default'];
 			
@@ -569,8 +579,8 @@
 			this.setStyle();
 			var or = (NOKIA.mode == 'portrait') ? NOKIA.orientation : (NOKIA.orientation + 90);
 			var val = "rotate(" + or + "deg)";
-			$("#preview-ui-top").css("-moz-transform", val);
-			$("#preview-ui-top").css("-webkit-transform", val);
+			$("#DeviceDisplayLayout").css("-moz-transform", val);
+			$("#DeviceDisplayLayout").css("-webkit-transform", val);
 		},
 		
 		setMode : function(mode)
@@ -1141,7 +1151,7 @@
 					clearInterval(NOKIA.helper.intervalId);
 
 				NOKIA.helper.intervalId = setTimeout(function(){
-					NOKIA.menu.cancel()
+					NOKIA.menu.cancel();
 				}, 500);
 			});
 
--- a/org.symbian.tools.wrttools.previewer/preview/wrt_preview.html	Wed May 19 17:17:31 2010 -0700
+++ b/org.symbian.tools.wrttools.previewer/preview/wrt_preview.html	Thu May 20 13:14:48 2010 -0700
@@ -31,6 +31,7 @@
 <body>
 	<div id="preview-ui-top">
 		<div id="DeviceDisplayLayout" class="hide">
+		
 			<div id="DisplaySFKWrapper">
 				<div id="DisplayArea">
 					<div id="IconArea"></div>
@@ -55,7 +56,7 @@
 				</div>
 			</div>
 		<div id="Dialog" title="Notification window"></div>
-<div id="PreferencesTab" class="hide">
+	<div id="PreferencesTab" class="hide">
 	<div id="tabs">
 		<ul>
 			<li><a href="#tabs-1">Preferences</a></li>