From b25a18395e666bbe13506651d5de84054aae0fcc Mon Sep 17 00:00:00 2001 From: Aleksa Sarai Date: Thu, 31 Dec 2015 17:36:00 +0100 Subject: 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 --- gui/devices/1080x1920/res/ui.xml | 43 +++++- gui/devices/1920x1200/res/ui.xml | 35 +++++ gui/devices/320x320/res/ui.xml | 35 +++++ gui/devices/480x800/res/ui.xml | 43 +++++- gui/devices/800x480/res/ui.xml | 35 +++++ gui/devices/landscape/res/landscape.xml | 6 + gui/devices/portrait/res/portrait.xml | 10 +- gui/devices/watch/res/watch.xml | 6 + gui/objects.hpp | 11 +- gui/patternpassword.cpp | 212 ++++++++++++++++++++++++------ gui/theme/common/landscape.xml | 39 +++++- gui/theme/common/languages/en.xml | 1 + gui/theme/common/portrait.xml | 37 +++++- gui/theme/common/watch.xml | 76 ++++++++++- gui/theme/landscape_hdpi/ui.xml | 2 +- gui/theme/landscape_mdpi/ui.xml | 4 +- gui/theme/portrait_hdpi/ui.xml | 4 +- gui/theme/portrait_mdpi/ui.xml | 4 +- gui/theme/watch_mdpi/images/grid_less.png | Bin 0 -> 426 bytes gui/theme/watch_mdpi/images/grid_more.png | Bin 0 -> 581 bytes gui/theme/watch_mdpi/ui.xml | 6 +- 21 files changed, 548 insertions(+), 61 deletions(-) create mode 100644 gui/theme/watch_mdpi/images/grid_less.png create mode 100644 gui/theme/watch_mdpi/images/grid_more.png (limited to 'gui') diff --git a/gui/devices/1080x1920/res/ui.xml b/gui/devices/1080x1920/res/ui.xml index 0ac3e43b4..d49157720 100644 --- a/gui/devices/1080x1920/res/ui.xml +++ b/gui/devices/1080x1920/res/ui.xml @@ -200,14 +200,19 @@ - + + + + + - + + @@ -318,6 +323,40 @@ + + + + + + + + + +