diff options
author | Ethan Yonker <dees_troy@teamw.in> | 2018-07-25 16:52:17 +0200 |
---|---|---|
committer | Ethan Yonker <dees_troy@teamw.in> | 2019-03-20 21:42:49 +0100 |
commit | 64e0a6525f6f82a67649602de3fe1ad62c837c27 (patch) | |
tree | c3bd4dfd1d72cb4da8b4fad97bf4861406bb850f | |
parent | Merge "Update FDE decrypt to pie from CAF" into android-9.0 (diff) | |
download | android_bootable_recovery-64e0a6525f6f82a67649602de3fe1ad62c837c27.tar android_bootable_recovery-64e0a6525f6f82a67649602de3fe1ad62c837c27.tar.gz android_bootable_recovery-64e0a6525f6f82a67649602de3fe1ad62c837c27.tar.bz2 android_bootable_recovery-64e0a6525f6f82a67649602de3fe1ad62c837c27.tar.lz android_bootable_recovery-64e0a6525f6f82a67649602de3fe1ad62c837c27.tar.xz android_bootable_recovery-64e0a6525f6f82a67649602de3fe1ad62c837c27.tar.zst android_bootable_recovery-64e0a6525f6f82a67649602de3fe1ad62c837c27.zip |
-rw-r--r-- | gui/gui.cpp | 7 | ||||
-rw-r--r-- | gui/listbox.cpp | 4 | ||||
-rwxr-xr-x | gui/theme/common/landscape.xml | 87 | ||||
-rwxr-xr-x | gui/theme/common/portrait.xml | 94 | ||||
-rwxr-xr-x | gui/theme/common/watch.xml | 101 | ||||
-rw-r--r-- | gui/theme/portrait_hdpi/ui.xml | 1 | ||||
-rwxr-xr-x | gui/theme/portrait_mdpi/ui.xml | 1 | ||||
-rw-r--r-- | gui/theme/watch_mdpi/images/handle.png | bin | 557 -> 412 bytes |
8 files changed, 171 insertions, 124 deletions
diff --git a/gui/gui.cpp b/gui/gui.cpp index a270e365f..ce8c3e29d 100644 --- a/gui/gui.cpp +++ b/gui/gui.cpp @@ -474,6 +474,13 @@ static void ors_command_read() gui_set_FILE(orsout); PageManager::GetResources()->DumpStrings(); ors_command_done(); + } else if (strlen(command) == 11 && strncmp(command, "reloadtheme", 11) == 0) { + PageManager::RequestReload(); + ors_command_done(); + } else if (strlen(command) > 11 && strncmp(command, "changepage=", 11) == 0) { + char* pg = &command[11]; + gui_changePage(pg); + ors_command_done(); } else { // mirror output messages gui_set_FILE(orsout); diff --git a/gui/listbox.cpp b/gui/listbox.cpp index 9d36baed7..9fbe09234 100644 --- a/gui/listbox.cpp +++ b/gui/listbox.cpp @@ -102,8 +102,10 @@ GUIListBox::GUIListBox(xml_node<>* node) : GUIScrollList(node) item.selected = (child->value() == currentValue); item.action = NULL; xml_node<>* action = child->first_node("action"); + if (!action) + action = child->first_node("actions"); if (action) { - item.action = new GUIAction(action); + item.action = new GUIAction(child); allowSelection = true; } xml_node<>* variable_name = child->first_node("data"); diff --git a/gui/theme/common/landscape.xml b/gui/theme/common/landscape.xml index 6df886256..a3e6ed82a 100755 --- a/gui/theme/common/landscape.xml +++ b/gui/theme/common/landscape.xml @@ -165,6 +165,16 @@ <font resource="font_m" spacing="%partitionlist_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%"/> </style> + <style name="advanced_listbox"> + <highlight color="%fileselector_highlight_color%"/> + <fastscroll linecolor="%fileselector_linecolor%" rectcolor="%accent_color%" w="%fastscroll_w%" linew="%fastscroll_linew%" rectw="%fastscroll_rectw%" recth="%fastscroll_recth%"/> + <separator color="%fileselector_linecolor%" height="%fileselector_separatorheight%"/> + <dimensions lineh="%slidervalue_lineh%" linepadding="%slidervalue_padding%" sliderw="%slidervalue_sliderw%" sliderh="%slidervalue_sliderh%"/> + <icon selected="handle" unselected="handle"/> + <background color="%background_color%"/> + <font resource="font_m" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%accent_color%"/> + </style> + <style name="slider"> <placement x="%col2_x_right%" y="%row17a_y%"/> <font resource="font_m" color="%text_color%"/> @@ -3339,24 +3349,7 @@ </button> <button style="main_button"> - <condition var1="tw_has_data_media" var2="1"/> - <placement x="%center_x%" y="%row2_y%"/> - <text>{@fix_context_btn=Fix Contexts}</text> - <action function="page">fixcontexts</action> - </button> - - <button style="main_button"> - <condition var1="tw_allow_partition_sdcard" var2="1"/> <placement x="%col1_x_left%" y="%row6a_y%"/> - <text>{@part_sd_btn=Partition SD Card}</text> - <actions> - <action function="set">partitionlisterror=0</action> - <action function="page">partsdcardsel</action> - </actions> - </button> - - <button style="main_button"> - <placement x="%center_x%" y="%row6a_y%"/> <text>{@file_manager_btn=File Manager}</text> <action function="page">filemanagerlist</action> </button> @@ -3368,38 +3361,44 @@ </button> <button style="main_button"> - <placement x="%center_x%" y="%row11_y%"/> - <text>{@reload_theme_btn=Reload Theme}</text> - <action function="reload"/> - </button> - - <button style="main_button"> <placement x="%col1_x_left%" y="%row15a_y%"/> <text>{@adb_sideload_btn=ADB Sideload}</text> <action function="page">sideload</action> </button> - <button style="main_button"> - <condition var1="tw_show_dumlock" var2="1"/> - <placement x="%center_x%" y="%row15a_y%"/> - <text>{@dumlock_btn=HTC Dumlock}</text> - <action function="page">htcdumlock</action> - </button> - - <button style="main_button"> - <condition var1="tw_has_injecttwrp" var2="1"/> - <placement x="%center_x%" y="%row15a_y%"/> - <text>{@inject_twrp_btn=Inject TWRP}</text> - <actions> - <action function="set">tw_back=advanced</action> - <action function="set">tw_action=reinjecttwrp</action> - <action function="set">tw_text1={@inject_twrp_confirm=Re-Inject TWRP?}</action> - <action function="set">tw_action_text1={@injecting_twrp=Re-Injecting TWRP...}</action> - <action function="set">tw_complete_text1={@inject_twrp_complete=TWRP Injection Complete}</action> - <action function="set">tw_slider_text={@swipe_to_confirm=Swipe to Confirm}</action> - <action function="page">confirm_action</action> - </actions> - </button> + <listbox style="advanced_listbox"> + <placement x="%center_x%" y="%row2_y%" w="%content_half_width%" h="%fileselector_install_height%"/> + <listitem name="{@reload_theme_btn=Reload Theme}"> + <action function="reload"/> + </listitem> + <listitem name="{@part_sd_btn=Partition SD Card}"> + <condition var1="tw_allow_partition_sdcard" var2="1"/> + <actions> + <action function="set">partitionlisterror=0</action> + <action function="page">partsdcardsel</action> + </actions> + </listitem> + <listitem name="{@fix_context_btn=Fix Contexts}"> + <condition var1="tw_has_data_media" var2="1"/> + <action function="page">fixcontexts</action> + </listitem> + <listitem name="{@dumlock_btn=HTC Dumlock}"> + <condition var1="tw_show_dumlock" var2="1"/> + <action function="page">htcdumlock</action> + </listitem> + <listitem name="{@inject_twrp_btn=Inject TWRP}"> + <condition var1="tw_has_injecttwrp" var2="1"/> + <actions> + <action function="set">tw_back=advanced</action> + <action function="set">tw_action=reinjecttwrp</action> + <action function="set">tw_text1={@inject_twrp_confirm=Re-Inject TWRP?}</action> + <action function="set">tw_action_text1={@injecting_twrp=Re-Injecting TWRP...}</action> + <action function="set">tw_complete_text1={@inject_twrp_complete=TWRP Injection Complete}</action> + <action function="set">tw_slider_text={@swipe_to_confirm=Swipe to Confirm}</action> + <action function="page">confirm_action</action> + </actions> + </listitem> + </listbox> <action> <touch key="home"/> diff --git a/gui/theme/common/portrait.xml b/gui/theme/common/portrait.xml index c2d32dd3e..c993225bb 100755 --- a/gui/theme/common/portrait.xml +++ b/gui/theme/common/portrait.xml @@ -136,6 +136,16 @@ <font resource="font_m" spacing="%partitionlist_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%"/> </style> + <style name="advanced_listbox"> + <highlight color="%fileselector_highlight_color%"/> + <fastscroll linecolor="%fileselector_linecolor%" rectcolor="%accent_color%" w="%fastscroll_w%" linew="%fastscroll_linew%" rectw="%fastscroll_rectw%" recth="%fastscroll_recth%"/> + <separator color="%fileselector_linecolor%" height="%fileselector_separatorheight%"/> + <dimensions lineh="%slidervalue_lineh%" linepadding="%slidervalue_padding%" sliderw="%slidervalue_sliderw%" sliderh="%slidervalue_sliderh%"/> + <icon selected="handle" unselected="handle"/> + <background color="%background_color%"/> + <font resource="font_m" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%accent_color%"/> + </style> + <style name="slider"> <placement x="%center_x%" y="%row23_y%"/> <font resource="font_s" color="%text_color%"/> @@ -3501,18 +3511,14 @@ <button style="main_button"> <condition var1="tw_has_data_media" var2="1"/> <placement x="%center_x%" y="%row2a_y%"/> - <text>{@fix_context_btn=Fix Contexts}</text> - <action function="page">fixcontexts</action> + <text>{@adb_sideload_btn=ADB Sideload}</text> + <action function="page">sideload</action> </button> <button style="main_button"> - <condition var1="tw_allow_partition_sdcard" var2="1"/> <placement x="%indent%" y="%row8_y%"/> - <text>{@part_sd_btn=Partition SD Card}</text> - <actions> - <action function="set">partitionlisterror=0</action> - <action function="page">partsdcardsel</action> - </actions> + <text>{@terminal_btn=Terminal}</text> + <action function="page">terminalcommand</action> </button> <button style="main_button"> @@ -3521,45 +3527,39 @@ <action function="page">filemanagerlist</action> </button> - <button style="main_button"> - <placement x="%indent%" y="%row13a_y%"/> - <text>{@terminal_btn=Terminal}</text> - <action function="page">terminalcommand</action> - </button> - - <button style="main_button"> - <placement x="%center_x%" y="%row13a_y%"/> - <text>{@reload_theme_btn=Reload Theme}</text> - <action function="reload"/> - </button> - - <button style="main_button"> - <placement x="%indent%" y="%row19_y%"/> - <text>{@adb_sideload_btn=ADB Sideload}</text> - <action function="page">sideload</action> - </button> - - <button style="main_button"> - <condition var1="tw_show_dumlock" var2="1"/> - <placement x="%center_x%" y="%row19_y%"/> - <text>{@dumlock_btn=HTC Dumlock}</text> - <action function="page">htcdumlock</action> - </button> - - <button style="main_button"> - <condition var1="tw_has_injecttwrp" var2="1"/> - <placement x="%center_x%" y="%row19_y%"/> - <text>{@inject_twrp_btn=Inject TWRP}</text> - <actions> - <action function="set">tw_back=advanced</action> - <action function="set">tw_action=reinjecttwrp</action> - <action function="set">tw_text1={@inject_twrp_confirm=Re-Inject TWRP?}</action> - <action function="set">tw_action_text1={@injecting_twrp=Re-Injecting TWRP...}</action> - <action function="set">tw_complete_text1={@inject_twrp_complete=TWRP Injection Complete}</action> - <action function="set">tw_slider_text={@swipe_to_confirm=Swipe to Confirm}</action> - <action function="page">confirm_action</action> - </actions> - </button> + <listbox style="advanced_listbox"> + <placement x="%indent%" y="%row13a_y%" w="%content_width%" h="%listbox_advanced_height%"/> + <listitem name="{@reload_theme_btn=Reload Theme}"> + <action function="reload"/> + </listitem> + <listitem name="{@part_sd_btn=Partition SD Card}"> + <condition var1="tw_allow_partition_sdcard" var2="1"/> + <actions> + <action function="set">partitionlisterror=0</action> + <action function="page">partsdcardsel</action> + </actions> + </listitem> + <listitem name="{@fix_context_btn=Fix Contexts}"> + <condition var1="tw_has_data_media" var2="1"/> + <action function="page">fixcontexts</action> + </listitem> + <listitem name="{@dumlock_btn=HTC Dumlock}"> + <condition var1="tw_show_dumlock" var2="1"/> + <action function="page">htcdumlock</action> + </listitem> + <listitem name="{@inject_twrp_btn=Inject TWRP}"> + <condition var1="tw_has_injecttwrp" var2="1"/> + <actions> + <action function="set">tw_back=advanced</action> + <action function="set">tw_action=reinjecttwrp</action> + <action function="set">tw_text1={@inject_twrp_confirm=Re-Inject TWRP?}</action> + <action function="set">tw_action_text1={@injecting_twrp=Re-Injecting TWRP...}</action> + <action function="set">tw_complete_text1={@inject_twrp_complete=TWRP Injection Complete}</action> + <action function="set">tw_slider_text={@swipe_to_confirm=Swipe to Confirm}</action> + <action function="page">confirm_action</action> + </actions> + </listitem> + </listbox> <action> <touch key="home"/> diff --git a/gui/theme/common/watch.xml b/gui/theme/common/watch.xml index 0c30a3499..79ac5ecad 100755 --- a/gui/theme/common/watch.xml +++ b/gui/theme/common/watch.xml @@ -166,6 +166,16 @@ <font resource="font_m" spacing="%partitionlist_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%"/> </style> + <style name="advanced_listbox"> + <highlight color="%fileselector_highlight_color%"/> + <fastscroll linecolor="%fileselector_linecolor%" rectcolor="%accent_color%" w="%fastscroll_w%" linew="%fastscroll_linew%" rectw="%fastscroll_rectw%" recth="%fastscroll_recth%"/> + <separator color="%fileselector_linecolor%" height="%fileselector_separatorheight%"/> + <dimensions lineh="%slidervalue_lineh%" linepadding="%slidervalue_padding%" sliderw="%slidervalue_sliderw%" sliderh="%slidervalue_sliderh%"/> + <icon selected="handle" unselected="handle"/> + <background color="%background_color%"/> + <font resource="font_m" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%accent_color%"/> + </style> + <style name="slider"> <placement x="%center_x%" y="%slider_y%"/> <font resource="font_l" color="%text_color%"/> @@ -4104,42 +4114,69 @@ <action function="page">fixcontexts</action> </button> - <button style="main_button"> - <placement x="%col1_x_left%" y="%row6_y%"/> - <text>{@reload_theme_btn=Reload Theme}</text> - <action function="reload"/> + <button> + <placement x="%btn4_col4_x%" y="%row11_y%"/> + <highlight color="%highlight_color%"/> + <image resource="q_btn_arrow_right"/> + <action function="page">advanced2</action> </button> - <button style="main_button"> - <condition var1="tw_allow_partition_sdcard" var2="1"/> - <placement x="%col1_x_right%" y="%row6_y%"/> - <text>{@part_sd_s_btn=SD Card}</text> - <actions> - <action function="set">partitionlisterror=0</action> - <action function="page">partsdcardsel</action> - </actions> - </button> + <action> + <touch key="home"/> + <action function="page">main</action> + </action> - <button style="main_button"> - <condition var1="tw_show_dumlock" var2="1"/> - <placement x="%col1_x_left%" y="%row11_y%"/> - <text>{@dumlock_btn=HTC Dumlock}</text> - <action function="page">htcdumlock</action> - </button> + <action> + <touch key="back"/> + <action function="page">main3</action> + </action> + </page> - <button style="main_button"> - <condition var1="tw_has_injecttwrp" var2="1"/> - <placement x="%col1_x_right%" y="%row11_y%"/> - <text>{@inject_twrp_btn=Inject TWRP}</text> - <actions> - <action function="set">tw_back=advanced</action> - <action function="set">tw_action=reinjecttwrp</action> - <action function="set">tw_text1={@inject_twrp_confirm=Re-Inject TWRP?}</action> - <action function="set">tw_action_text1={@injecting_twrp=Re-Injecting TWRP...}</action> - <action function="set">tw_complete_text1={@inject_twrp_complete=TWRP Injection Complete}</action> - <action function="set">tw_slider_text={@swipe_confirm= Confirm}</action> - <action function="page">confirm_action</action> - </actions> + <page name="advanced2"> + <template name="page"/> + + <template name="statusbar"/> + + <text style="text_m"> + <placement x="%col1_x_left%" y="%row1_header_y%"/> + <text>{@advanced_hdr=Advanced}</text> + </text> + + <listbox style="advanced_listbox"> + <placement x="%indent%" y="%row2_header_y%" w="%content_width%" h="%fileselector_install_height%"/> + <listitem name="{@reload_theme_btn=Reload Theme}"> + <action function="reload"/> + </listitem> + <listitem name="{@part_sd_btn=Partition SD Card}"> + <condition var1="tw_allow_partition_sdcard" var2="1"/> + <actions> + <action function="set">partitionlisterror=0</action> + <action function="page">partsdcardsel</action> + </actions> + </listitem> + <listitem name="{@dumlock_btn=HTC Dumlock}"> + <condition var1="tw_show_dumlock" var2="1"/> + <action function="page">htcdumlock</action> + </listitem> + <listitem name="{@inject_twrp_btn=Inject TWRP}"> + <condition var1="tw_has_injecttwrp" var2="1"/> + <actions> + <action function="set">tw_back=advanced</action> + <action function="set">tw_action=reinjecttwrp</action> + <action function="set">tw_text1={@inject_twrp_confirm=Re-Inject TWRP?}</action> + <action function="set">tw_action_text1={@injecting_twrp=Re-Injecting TWRP...}</action> + <action function="set">tw_complete_text1={@inject_twrp_complete=TWRP Injection Complete}</action> + <action function="set">tw_slider_text={@swipe_to_confirm=Swipe to Confirm}</action> + <action function="page">confirm_action</action> + </actions> + </listitem> + </listbox> + + <button> + <placement x="%col1_x_left%" y="%row11_y%"/> + <highlight color="%highlight_color%"/> + <image resource="q_btn_arrow_left"/> + <action function="page">advanced</action> </button> <action> diff --git a/gui/theme/portrait_hdpi/ui.xml b/gui/theme/portrait_hdpi/ui.xml index a7a0442f4..f9ce5b09d 100644 --- a/gui/theme/portrait_hdpi/ui.xml +++ b/gui/theme/portrait_hdpi/ui.xml @@ -202,6 +202,7 @@ <variable name="partitionlist_backup_height" value="768"/> <variable name="listbox_timezone_height" value="756"/> <variable name="listbox_settings_height" value="960"/> + <variable name="listbox_advanced_height" value="700"/> <variable name="fastscroll_w" value="24"/> <variable name="fastscroll_linew" value="2"/> <variable name="fastscroll_rectw" value="24"/> diff --git a/gui/theme/portrait_mdpi/ui.xml b/gui/theme/portrait_mdpi/ui.xml index 0196a4906..8b91641ec 100755 --- a/gui/theme/portrait_mdpi/ui.xml +++ b/gui/theme/portrait_mdpi/ui.xml @@ -202,6 +202,7 @@ <variable name="partitionlist_backup_height" value="312"/> <variable name="listbox_timezone_height" value="306"/> <variable name="listbox_settings_height" value="400"/> + <variable name="listbox_advanced_height" value="290"/> <variable name="fastscroll_w" value="10"/> <variable name="fastscroll_linew" value="2"/> <variable name="fastscroll_rectw" value="10"/> diff --git a/gui/theme/watch_mdpi/images/handle.png b/gui/theme/watch_mdpi/images/handle.png Binary files differindex e474978fa..f1c9e3290 100644 --- a/gui/theme/watch_mdpi/images/handle.png +++ b/gui/theme/watch_mdpi/images/handle.png |