From a3ec38342d2be943111f3d7548905497cfc92585 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 8 Apr 2021 12:27:43 +0530 Subject: [PATCH] Cant customize left of controls footer so hide that control --- src/pyj/read_book/prefs/head_foot.pyj | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/pyj/read_book/prefs/head_foot.pyj b/src/pyj/read_book/prefs/head_foot.pyj index 8f49e59add..93cfd67d19 100644 --- a/src/pyj/read_book/prefs/head_foot.pyj +++ b/src/pyj/read_book/prefs/head_foot.pyj @@ -14,7 +14,7 @@ from utils import fmt_sidx CONTAINER = unique_id('reader-hf-prefs') -def create_item(region, label): +def create_item(region, label, style): def sep(): return E.option('\xa0', disabled=True) @@ -22,6 +22,7 @@ def create_item(region, label): return E.option(label, id=name, value=name, selected=bool(selected)) return E.tr( + style = style or '', E.td(label + ':', style='padding: 1ex 1rem'), E.td(E.select( data_region=region, @@ -55,6 +56,13 @@ def create_items(which): create_item('middle', _('Middle')), create_item('right', _('Right')) ) + elif which is 'controls_footer': + ans = E.table( + data_which=which, + create_item('left', _('Left'), 'display: none'), + create_item('middle', _('Middle')), + create_item('right', _('Right')) + ) else: ans = E.table( data_which=which,