summaryrefslogtreecommitdiffstats
path: root/MainPanel.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 /MainPanel.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 'MainPanel.c')
-rw-r--r--MainPanel.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/MainPanel.c b/MainPanel.c
index c8a4c059..9fbd69d9 100644
--- a/MainPanel.c
+++ b/MainPanel.c
@@ -51,6 +51,7 @@ static HandlerResult MainPanel_eventHandler(Panel* super, int ch) {
Htop_Reaction reaction = HTOP_OK;
+ /* reset on every normal key */
if (ch != ERR && ch != KEY_RESIZE)
this->state->hideProcessSelection = false;
@@ -160,8 +161,13 @@ bool MainPanel_foreachProcess(MainPanel* this, MainPanel_ForeachProcessFn fn, Ar
return ok;
}
-static void MainPanel_drawFunctionBar(Panel* super) {
+static void MainPanel_drawFunctionBar(Panel* super, bool hideFunctionBar) {
MainPanel* this = (MainPanel*) super;
+
+ // Do not hide active search and filter bar.
+ if (hideFunctionBar && !this->inc->active)
+ return;
+
IncSet_drawBar(this->inc);
if (this->state->pauseProcessUpdate) {
FunctionBar_append("PAUSED", CRT_colors[PAUSED]);

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