mirror of
https://github.com/xzeldon/htop.git
synced 2025-07-19 04:26:37 +03:00
Rework drawing of FunctionBar
Draw the FunctionBar within Panel_draw instead of manually throughout the code. Add an optional PanelClass function drawFunctionBar, to allow specific panels to override the default FunctionBar_draw call. Rework the code on color change, to really change all colors (selection markers and panel headers). Closes: #402
This commit is contained in:
@ -55,13 +55,12 @@ void MetersPanel_setMoving(MetersPanel* this, bool moving) {
|
||||
selected->moving = moving;
|
||||
}
|
||||
if (!moving) {
|
||||
Panel_setSelectionColor(super, CRT_colors[PANEL_SELECTION_FOCUS]);
|
||||
Panel_setSelectionColor(super, PANEL_SELECTION_FOCUS);
|
||||
Panel_setDefaultBar(super);
|
||||
} else {
|
||||
Panel_setSelectionColor(super, CRT_colors[PANEL_SELECTION_FOLLOW]);
|
||||
Panel_setSelectionColor(super, PANEL_SELECTION_FOLLOW);
|
||||
super->currentBar = Meters_movingBar;
|
||||
}
|
||||
FunctionBar_draw(this->super.currentBar);
|
||||
}
|
||||
|
||||
static inline bool moveToNeighbor(MetersPanel* this, MetersPanel* neighbor, int selected) {
|
||||
|
Reference in New Issue
Block a user