gui: theme changes for terminal

Done:

Portrait HDPI, MDPI
Landscape HDPI, MDPI
Watch

Also still includes ugly changes for the old portrait theme to test the
terminal emulator.

Change-Id: If32af1c69b85417522a8a2fb9c20be515b4d70fc
diff --git a/gui/devices/1080x1920/res/ui.xml b/gui/devices/1080x1920/res/ui.xml
index d491577..79bf502 100644
--- a/gui/devices/1080x1920/res/ui.xml
+++ b/gui/devices/1080x1920/res/ui.xml
@@ -17,6 +17,9 @@
 		<resource name="font" type="font" filename="RobotoCondensed-Regular.ttf" size="40" />
 		<resource name="mediumfont" type="font" filename="RobotoCondensed-Regular.ttf" size="40" />
 		<resource name="filelist" type="font" filename="RobotoCondensed-Regular.ttf" size="40" />
+		<resource name="keylabel" type="font" filename="RobotoCondensed-Regular.ttf" size="50" />
+		<resource name="keylabel-small" type="font" filename="RobotoCondensed-Regular.ttf" size="40" />
+		<resource name="keylabel-longpress" type="font" filename="RobotoCondensed-Regular.ttf" size="30" />
 		<resource name="fixed" type="font" filename="DroidSansMono.ttf" size="30" />
 		<resource name="twrplogo" type="image" filename="twrplogo" retainaspect="1" />
 		<resource name="main_button" type="image" filename="menu-button" />
@@ -172,7 +175,7 @@
 		<variable name="filemanager_select_x" value="840" />
 		<variable name="filemanager_select_y" value="1620" />
 		<variable name="backup_name_y" value="825" />
-		<variable name="terminal_console_height" value="1050" />
+		<variable name="terminal_console_height" value="1200" />
 		<variable name="terminal_text_y" value="1095" />
 		<variable name="terminal_button_y" value="1050" />
 		<variable name="row_dst_text_y" value="1080" />
@@ -444,8 +447,21 @@
 
 		<template name="keyboardtemplate">
 			<object type="keyboard">
-				<placement x="0" y="1200" />
+				<placement x="0" y="1200" w="1080" h="644" />
+				<keymargin x="6" y="6"/>
+				<background color="#202020"/>
+				<key-alphanumeric color="#282828" font="keylabel" textcolor="#ffffff"/>
+				<key-other color="#242424" font="keylabel-small" textcolor="#c0c0c0"/>
+				<longpress font="keylabel-longpress" textcolor="#808080" x="4" y="0"/>
+				<keylabel key="0:c:8" text="Bksp" resource="backspace"/>
+				<keylabel key="0:action" text="Enter" resource="enter"/>
+				<keylabel key="0:k:105" text="&lt;"/>
+				<keylabel key="0:k:108" text="v"/>
+				<keylabel key="0:k:103" text="^"/>
+				<keylabel key="0:k:106" text="&gt;"/>
+				<!--
 				<layout resource1="keyboard1" resource2="keyboard2" resource3="keyboard3" resource4="keyboard4" />
+				-->
 				<highlight color="%highlight_color%" />
 				<capshighlight color="%caps_highlight_color%" />
 				<layout1>
@@ -453,7 +469,9 @@
 					<row1 key01="q" long01="1" key02="w" long02="2" key03="e" long03="3" key04="r" long04="4" key05="t" long05="5" key06="y" long06="6" key07="u" long07="7" key08="i" long08="8" key09="o" long09="9" key10="p" long10="0" />
 					<row2 key01="162:a" long01="@" key02="s" long02="#" key03="d" long03="$" key04="f" long04="%" key05="g" long05="&amp;" key06="h" long06="*" key07="j" long07="-" key08="k" long08="+" key09="162:l" long09="_" />
 					<row3 key01="162:layout2" key02="z" long02="!" key03="x" key04="c" long04="'" key05="v" long05=":" key06="b" long06=";" key07="n" long07="/" key08="m" long08="?" key09="162:c:8" />
-					<row4 key01="162:layout3" key02="108:c:47" key03="108:" key04="432: " key05="." key06="162:action" />
+					<row4 key01="162:layout3" key02="108:c:47" key03="108:c:27" long03=":c:3" key04="432: " key05="." key06="162:action" />
+					<keylabel key="0:layout2" text="Shift" resource="shift"/>
+					<keylabel key="0:layout3" text="?123"/>
 				</layout1>
 				<layout2>
 					<keysize height="161" width="108" capslock="0" revert_layout="1" />
@@ -461,6 +479,8 @@
 					<row2 key01="162:A" long01="@" key02="S" long02="#" key03="D" long03="$" key04="F" long04="%" key05="G" long05="&amp;" key06="H" long06="*" key07="J" long07="-" key08="K" long08="+" key09="162:L" long09="_" />
 					<row3 key01="162:layout1" key02="Z" long02="!" key03="X" key04="C" long04="'" key05="V" long05=":" key06="B" long06=";" key07="N" long07="/" key08="M" long08="?" key09="162:c:8" />
 					<row4 key01="162:layout3" key02="/" key03="108:" key04="432: " key05="." key06="162:action" />
+					<keylabel key="0:layout1" text="Shift" resource="shift_fill"/>
+					<keylabel key="0:layout3" text="?123"/>
 				</layout2>
 				<layout3>
 					<keysize height="161" width="108" />
@@ -468,13 +488,17 @@
 					<row2 key01="@" key02="#" key03="$" key04="%" key05="&amp;" key06="*" key07="-" key08="+" key09="(" key10=")" />
 					<row3 key01="162:layout4" key02="!" key03="108:c:34" key04="'" key05=":" key06=";" key07="/" key08="?" key09="162:c:8" />
 					<row4 key01="162:layout1" key02="," key03="108:" key04="432: " key05="." key06="162:action" />
+					<keylabel key="0:layout1" text="ABC"/>
+					<keylabel key="0:layout4" text="~\{"/>
 				</layout3>
 				<layout4>
 					<keysize height="161" width="108" />
 					<row1 key01="~" key02="`" key03="|" key04="108:" key05="108:" key06="108:" key07="%" key08="108:" key09="{" key10="}" />
-					<row2 key01="108:" key02="108:" key03="108:" key04="108:" key05="108:" key06="^" key07="_" key08="=" key09="[" key10="]" />
+					<row2 key01="108:c:9" key02="108:k:105" key03="108:k:108" key04="108:k:103" key05="108:k:106" key06="^" key07="_" key08="=" key09="[" key10="]" />
 					<row3 key01="162:layout3" key02="108:" key03="108:" key04="108:" key05="108:" key06="\" key07="&lt;" key08="&gt;" key09="162:c:8" />
 					<row4 key01="162:layout1" key02="108:c:34" key03="108:" key04="432: " key05="." key06="162:action" />
+					<keylabel key="0:layout1" text="ABC"/>
+					<keylabel key="0:layout3" text="?123"/>
 				</layout4>
 			</object>
 		</template>
diff --git a/gui/devices/1920x1200/res/ui.xml b/gui/devices/1920x1200/res/ui.xml
index 160ddf6..ae75f8d 100644
--- a/gui/devices/1920x1200/res/ui.xml
+++ b/gui/devices/1920x1200/res/ui.xml
@@ -459,10 +459,10 @@
 				<capshighlight color="%caps_highlight_color%" />
 				<layout1>
 					<keysize height="129" width="159" />
-					<row1 key01="153:" key02="q" long02="1" key03="w" long03="2" key04="e" long04="3" key05="r" long05="4" key06="t" long06="5" key07="y" long07="6" key08="u" long08="7" key09="i" long09="8" key10="o" long10="9" key11="p" long11="0" key12="177:c:8" />
+					<row1 key01="153:c:9" key02="q" long02="1" key03="w" long03="2" key04="e" long04="3" key05="r" long05="4" key06="t" long06="5" key07="y" long07="6" key08="u" long08="7" key09="i" long09="8" key10="o" long10="9" key11="p" long11="0" key12="177:c:8" />
 					<row2 key01="213:layout3" key02="156:a" key03="156:s" key04="156:d" key05="156:f" key06="156:g" key07="156:h" key08="156:j" key09="k" key10="156:l" key11="303:action" />
 					<row3 key01="269:layout2" key02="154:z" key03="154:x" key04="154:c" key05="154:v" key06="154:b" key07="154:n" key08="154:m" key09="154:," long09="!" key10="154:." long10="?" key11="265:layout2" />
-					<row4 key01="600:" key02="720: " key03="/" long03=":" key04="-" long04="_" />
+					<row4 key01="600:c:27" long01=":c:3" key02="720: " key03="/" long03=":" key04="-" long04="_" />
 				</layout1>
 				<layout2>
 					<keysize height="129" width="159" capslock="0" revert_layout="1" />
@@ -481,7 +481,7 @@
 				<layout4>
 					<keysize height="129" width="159" />
 					<row1 key01="153:" key02="~" key03="`" key04="|" key05="159:" key06="159:" key07="159:" key08="159:" key09="159:" key10="159:" key11="159:" key12="177:c:8" />
-					<row2 key01="213:layout1" key02="156:" key03="156:" key04="156:" key05="156:" key06="156:^" key07="156:" key08="156:" key09="156:{" key10="156:}" key11="303:action" />
+					<row2 key01="213:layout1" key02="156:c:-105" key03="156:c:-108" key04="156:c:-103" key05="156:c:-106" key06="156:^" key07="156:" key08="156:" key09="156:{" key10="156:}" key11="303:action" />
 					<row3 key01="269:layout3" key02="154:\" key03="154:" key04="154:" key05="154:" key06="154:" key07="154:[" key08="154:]" key09="154:!" key10="154:?" key11="265:layout3" />
 					<row4 key01="600:" key02="720: " />
 				</layout4>
diff --git a/gui/devices/landscape/res/landscape.xml b/gui/devices/landscape/res/landscape.xml
index b0f6b16..c2a117d 100644
--- a/gui/devices/landscape/res/landscape.xml
+++ b/gui/devices/landscape/res/landscape.xml
@@ -3467,7 +3467,8 @@
 		<page name="terminalcommand">
 			<background color="#000000FF" />
 
-			<object type="console">
+			<object type="terminal" style="console">
+				<font resource="fixed" spacing="3" color="%text_color%" />
 				<placement x="%console_x%" y="%terminal_console_y%" w="%console_width%" h="%terminal_console_height%" />
 			</object>
 
@@ -3475,7 +3476,7 @@
 				<placement x="%input_x%" y="%terminal_text_y%" placement="0" />
 				<text>Starting Path: %tw_terminal_location%</text>
 			</object>
-
+<!--
 			<object type="input">
 				<condition var1="tw_terminal_state" var2="0" />
 				<placement x="%input_x%" y="%terminal_text_y%" w="%terminal_input_width%" h="%input_height%" placement="0" />
@@ -3485,7 +3486,7 @@
 				<restrict minlen="1" />
 				<action function="terminalcommand">%tw_terminal_command%</action>
 			</object>
-
+-->
 			<object type="button" style="mediumbutton">
 				<condition var1="tw_terminal_state" var2="1" />
 				<placement x="%filemanager_select_x%" y="%terminal_button_y%" />
diff --git a/gui/devices/portrait/res/portrait.xml b/gui/devices/portrait/res/portrait.xml
index b7e79e9..8d21777 100644
--- a/gui/devices/portrait/res/portrait.xml
+++ b/gui/devices/portrait/res/portrait.xml
@@ -2653,8 +2653,8 @@
 
 			<object type="button">
 				<placement x="%col1_x%" y="%row3_y%" />
-				<text>Terminal Command</text>
-				<action function="page">terminalfolder</action>
+				<text>Terminal Emulator</text>
+				<action function="page">terminalcommand</action>
 			</object>
 
 			<object type="button">
@@ -3450,7 +3450,7 @@
 				</actions>
 			</object>
 		</page>
-
+<!--
 		<page name="terminalfolder">
 			<object type="template" name="header" />
 
@@ -3490,14 +3490,15 @@
 
 			<object type="template" name="footer" />
 		</page>
-
+-->
 		<page name="terminalcommand">
 			<object type="template" name="header" />
 
-			<object type="console">
-				<placement x="%console_x%" y="0" w="%console_width%" h="%terminal_console_height%" />
+			<object type="terminal" style="console">
+				<font resource="fixed" spacing="3" color="%text_color%" />
+				<placement x="%console_x%" y="%terminal_console_y%" w="%console_width%" h="%terminal_console_height%" />
 			</object>
-
+<!--
 			<object type="text">
 				<placement x="%col1_x%" y="%terminal_text_y%" placement="0" />
 				<text>Starting Path: %tw_terminal_location%</text>
@@ -3512,16 +3513,38 @@
 				<restrict minlen="1" />
 				<action function="terminalcommand">%tw_terminal_command%</action>
 			</object>
-
 			<object type="button" style="mediumbutton">
 				<condition var1="tw_terminal_state" var2="1" />
 				<placement x="%filemanager_select_x%" y="%terminal_button_y%" />
 				<text>KILL</text>
 				<action function="killterminal"></action>
 			</object>
+-->
 
 			<object type="template" name="keyboardtemplate" />
 
+			<object type="keyboard">
+				<placement x="120" y="1840" w="840" h="80" />
+				<keymargin x="6" y="6"/>
+				<background color="#202020"/>
+				<key-alphanumeric color="#282828" font="keylabel" textcolor="#ffffff"/>
+				<key-other color="#242424" font="keylabel-small" textcolor="#c0c0c0"/>
+				<longpress font="keylabel-longpress" textcolor="#808080"/>
+				<keylabel key="0:k:29" text="Ctrl"/>
+				<keylabel key="0:c:27" text="Esc"/>
+				<keylabel key="0:c:9" text="Tab"/>
+				<keylabel key="0:k:105" text="&lt;"/>
+				<keylabel key="0:k:108" text="v"/>
+				<keylabel key="0:k:103" text="^"/>
+				<keylabel key="0:k:106" text="&gt;"/>
+				<highlight color="%highlight_color%" />
+				<ctrlhighlight color="#E5333380" />
+				<layout1>
+					<keysize height="80" width="120" />
+					<row1 key01="120:k:29" key02="120:c:27" long02=":c:3" key03="120:c:9" key04="120:k:105" key05="120:k:108" key06="120:k:103" key07="120:k:106"/>
+				</layout1>
+			</object>
+
 			<object type="action">
 				<touch key="home" />
 				<action function="page">main</action>
@@ -3529,7 +3552,7 @@
 
 			<object type="action">
 				<touch key="back" />
-				<action function="page">terminalfolder</action>
+				<action function="page">advanced</action>
 			</object>
 		</page>