gui: PatternPassword: allow any N*N grid

Rather than only supporting a 3x3 grid, allow for multiple grid sizes
(using the CyanogenMod method of generating passphrases for non-3x3
grids). Also fix the detection of touches, as the old code was far too
sensitive for larger grids (and also didn't make much sense).

Change-Id: I343ef654e6d29ce0cb790a28281be7c7c9b171d9
Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
diff --git a/gui/theme/landscape_mdpi/ui.xml b/gui/theme/landscape_mdpi/ui.xml
index 818c23d..f4b34a7 100644
--- a/gui/theme/landscape_mdpi/ui.xml
+++ b/gui/theme/landscape_mdpi/ui.xml
@@ -206,10 +206,10 @@
 		<variable name="progress_x" value="230" />

 		<variable name="progress_text_x" value="40" />

 		<variable name="progress_text_y" value="348" />

-		<variable name="pattern_x" value="300" />

+		<variable name="pattern_x" value="84" />

 		<variable name="pattern_dot_dia" value="12" />

 		<variable name="pattern_line_w" value="4" />

-		<variable name="pattern_size" value="200" />

+		<variable name="pattern_size" value="252" />

 	</variables>

 

 	<mousecursor>