hotkeys in fixed position

This commit is contained in:
sbcgua 2018-11-27 11:11:51 +02:00 committed by Lars Hvam
parent 8966f493c9
commit 48bb8be737
2 changed files with 19 additions and 6 deletions

View File

@ -53,6 +53,7 @@ CLASS zcl_abapgit_gui_chunk_lib DEFINITION PUBLIC FINAL CREATE PUBLIC.
iv_title TYPE string
iv_hide TYPE abap_bool DEFAULT abap_true
iv_hint TYPE string OPTIONAL
iv_scrollable TYPE abap_bool DEFAULT abap_true
io_content TYPE REF TO zcl_abapgit_html
RETURNING
VALUE(ro_html) TYPE REF TO zcl_abapgit_html
@ -160,6 +161,7 @@ CLASS ZCL_ABAPGIT_GUI_CHUNK_LIB IMPLEMENTATION.
iv_title = 'Hotkeys'
iv_hint = lv_hint
iv_hide = abap_true
iv_scrollable = abap_false
io_content = ro_html ).
IF <ls_hotkey> IS ASSIGNED AND zcl_abapgit_hotkeys=>should_show_hint( ) = abap_true.
@ -174,6 +176,7 @@ CLASS ZCL_ABAPGIT_GUI_CHUNK_LIB IMPLEMENTATION.
METHOD render_infopanel.
DATA lv_display TYPE string.
DATA lv_class TYPE string.
CREATE OBJECT ro_html.
@ -181,7 +184,12 @@ CLASS ZCL_ABAPGIT_GUI_CHUNK_LIB IMPLEMENTATION.
lv_display = 'display:none'.
ENDIF.
ro_html->add( |<div id="{ iv_div_id }" class="info-panel" style="{ lv_display }">| ).
lv_class = 'info-panel'.
IF iv_scrollable = abap_false. " Initially hide
lv_class = lv_class && ' info-panel-fixed'.
ENDIF.
ro_html->add( |<div id="{ iv_div_id }" class="{ lv_class }" style="{ lv_display }">| ).
ro_html->add( |<div class="info-title">{ iv_title }|
&& '<div class="float-right">'

View File

@ -806,6 +806,11 @@ div.info-panel {
box-shadow: 1px 1px 3px 2px #dcdcdc;
}
div.info-panel-fixed {
position: fixed;
top: 15%;
}
div.info-panel div.info-hint {
text-transform: uppercase;
font-size: small;