diff --git a/src/zcl_abapgit_label_designer.clas.abap b/src/zcl_abapgit_label_designer.clas.abap index da1db4d..9bbd3be 100644 --- a/src/zcl_abapgit_label_designer.clas.abap +++ b/src/zcl_abapgit_label_designer.clas.abap @@ -76,14 +76,14 @@ CLASS zcl_abapgit_label_designer DEFINITION PRIVATE SECTION. CONSTANTS: - c_modes TYPE i VALUE 4, - c_cols TYPE i VALUE 8, + c_modes TYPE i VALUE 3, + " Dark and full modes aren't much different so we ignore them (to see them, change c_modes = 5, c_cols = 10 to see them) BEGIN OF c_color_mode, - full TYPE string VALUE '', + light TYPE string VALUE ' light', white TYPE string VALUE ' on white', black TYPE string VALUE ' on black', - light TYPE string VALUE ' light', dark TYPE string VALUE ' dark', + full TYPE string VALUE '', END OF c_color_mode. TYPES: @@ -144,6 +144,7 @@ CLASS zcl_abapgit_label_designer DEFINITION mv_dark_mode TYPE abap_bool, mt_labels TYPE ty_labels, mi_viewer TYPE REF TO zif_abapgit_html_viewer, + mv_cols TYPE i, mv_page TYPE i. METHODS render_page_1 @@ -252,6 +253,18 @@ CLASS zcl_abapgit_label_designer DEFINITION RETURNING VALUE(result) TYPE ty_gh_label. + METHODS _get_screen_size + RETURNING + VALUE(result) TYPE i. + + METHODS _get_buttons_1 + RETURNING + VALUE(result) TYPE string. + + METHODS _get_buttons_2 + RETURNING + VALUE(result) TYPE string. + ENDCLASS. @@ -261,7 +274,7 @@ CLASS zcl_abapgit_label_designer IMPLEMENTATION. METHOD back. mv_page = mv_page - 1. - IF mv_page = 0. + IF mv_page <= 0. result = abap_true. ENDIF. ENDMETHOD. @@ -326,8 +339,12 @@ CLASS zcl_abapgit_label_designer IMPLEMENTATION. render( li_event ). WHEN 'save'. save( li_event ). + mv_page = 1. + render( li_event ). WHEN 'back'. - back( ). + IF back( ) IS INITIAL. + render( li_event ). + ENDIF. WHEN OTHERS. BREAK-POINT. ENDCASE. @@ -350,6 +367,8 @@ CLASS zcl_abapgit_label_designer IMPLEMENTATION. METHOD render. + _get_screen_size( ). + CASE mv_page. WHEN 1. render_page_1( ii_event ). @@ -377,7 +396,10 @@ CLASS zcl_abapgit_label_designer IMPLEMENTATION. |
\n| && |