summaryrefslogtreecommitdiffstats
path: root/Panel.c
diff options
context:
space:
mode:
authorChristian Göttsche <cgzones@googlemail.com>2020-12-28 23:26:14 +0100
committercgzones <cgzones@googlemail.com>2021-01-04 23:12:43 +0100
commita3cced9fb615a1cfe0b334fc41dc785f1fb9aef5 (patch)
treeb54469629867cbff2a2dd7489a5c1682d5e22440 /Panel.c
parent24c5ca9ddfbe088a3d25694cbe170eaf3d7f828f (diff)
Add option to hide the Function Bar
Support three settings: - Always show Function Bar - Always hide the Function Bar, except in Infoscreens (Env/Locks...) and when editing the search and filter mode - Hide the Function Bar on ESC until the next user input Closes: #439
Diffstat (limited to 'Panel.c')
-rw-r--r--Panel.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/Panel.c b/Panel.c
index d59f3d6b..c76909cd 100644
--- a/Panel.c
+++ b/Panel.c
@@ -208,7 +208,7 @@ void Panel_splice(Panel* this, Vector* from) {
this->needsRedraw = true;
}
-void Panel_draw(Panel* this, bool force_redraw, bool focus, bool highlightSelected) {
+void Panel_draw(Panel* this, bool force_redraw, bool focus, bool highlightSelected, bool hideFunctionBar) {
assert (this != NULL);
int size = Vector_size(this->items);
@@ -217,6 +217,9 @@ void Panel_draw(Panel* this, bool force_redraw, bool focus, bool highlightSelect
int x = this->x;
int h = this->h;
+ if (hideFunctionBar)
+ h++;
+
const int header_attr = focus
? CRT_colors[PANEL_HEADER_FOCUS]
: CRT_colors[PANEL_HEADER_UNFOCUS];
@@ -319,8 +322,8 @@ void Panel_draw(Panel* this, bool force_redraw, bool focus, bool highlightSelect
if (focus && (this->needsRedraw || force_redraw || !this->wasFocus)) {
if (Panel_drawFunctionBarFn(this))
- Panel_drawFunctionBar(this);
- else
+ Panel_drawFunctionBar(this, hideFunctionBar);
+ else if (!hideFunctionBar)
FunctionBar_draw(this->currentBar);
}

© 2014-2024 Faster IT GmbH | imprint | privacy policy