From cb156955704c4950b885d43bb611a13e86f4eb64 Mon Sep 17 00:00:00 2001 From: Domi Bigl Date: Sat, 12 Jan 2019 10:24:11 +0100 Subject: [PATCH] switch to css class mega-octicon for HiDPI #2275 (#2276) * switch to css class mega-octicon for HiDPI * change css repo overview icon --- src/ui/zcl_abapgit_html.clas.abap | 21 +++++++++++++++------ src/zabapgit_css_common.w3mi.data.css | 4 +++- 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/src/ui/zcl_abapgit_html.clas.abap b/src/ui/zcl_abapgit_html.clas.abap index f9aa47151..dd688f654 100644 --- a/src/ui/zcl_abapgit_html.clas.abap +++ b/src/ui/zcl_abapgit_html.clas.abap @@ -90,7 +90,7 @@ ENDCLASS. -CLASS ZCL_ABAPGIT_HTML IMPLEMENTATION. +CLASS zcl_abapgit_html IMPLEMENTATION. METHOD a. @@ -210,10 +210,12 @@ CLASS ZCL_ABAPGIT_HTML IMPLEMENTATION. METHOD icon. - DATA: lv_hint TYPE string, - lv_name TYPE string, - lv_color TYPE string, - lv_class TYPE string. + DATA: lv_hint TYPE string, + lv_name TYPE string, + lv_color TYPE string, + lv_class TYPE string, + lv_octicon_class TYPE string, + lv_xpixel TYPE i. SPLIT iv_name AT '/' INTO lv_name lv_color. @@ -227,7 +229,14 @@ CLASS ZCL_ABAPGIT_HTML IMPLEMENTATION. lv_color = | { lv_color }|. ENDIF. - rv_str = ||. + lv_xpixel = cl_gui_cfw=>compute_pixel_from_metric( x_or_y = 'X' in = 1 ). + IF lv_xpixel >= 2. + lv_octicon_class = 'mega-octicon'. + ELSE. + lv_octicon_class = 'octicon'. + ENDIF. + + rv_str = ||. ENDMETHOD. diff --git a/src/zabapgit_css_common.w3mi.data.css b/src/zabapgit_css_common.w3mi.data.css index 5bf47ecd1..f985ad8cc 100644 --- a/src/zabapgit_css_common.w3mi.data.css +++ b/src/zabapgit_css_common.w3mi.data.css @@ -236,8 +236,10 @@ table.repo_tab { padding-bottom: 2px; } .repo_tab td.icon { - width: 32px; + width: 1px; text-align: center; + padding-left: 8px; + padding-right: 4px; } .repo_tab td.icon:not(:first-child) { width: 26px;