diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2015-11-02 10:33:37 -0500 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2015-11-02 10:33:37 -0500 |
commit | 3cfbcb72c8b36b3d9be5082053933abc60c849d1 (patch) | |
tree | 3d334bb0611598a5960e1775f05056f8b4320741 | |
parent | f187be92968fdf0563c17f2f8a8815ca942ed0f6 (diff) |
Highlight moving meters in a different color.
-rw-r--r-- | ColumnsPanel.c | 1 | ||||
-rw-r--r-- | MetersPanel.c | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/ColumnsPanel.c b/ColumnsPanel.c index 5733a3ff..e6fd7601 100644 --- a/ColumnsPanel.c +++ b/ColumnsPanel.c @@ -54,6 +54,7 @@ static HandlerResult ColumnsPanel_eventHandler(Panel* super, int ch) { { if (selected < size - 1) { this->moving = !(this->moving); + Panel_setSelectionColor(super, this->moving ? CRT_colors[PANEL_SELECTION_FOLLOW] : CRT_colors[PANEL_SELECTION_FOCUS]); ((ListItem*)Panel_getSelected(super))->moving = this->moving; result = HANDLED; } diff --git a/MetersPanel.c b/MetersPanel.c index 927d10c0..db910fb9 100644 --- a/MetersPanel.c +++ b/MetersPanel.c @@ -9,6 +9,7 @@ in the source distribution for its full text. #include <stdlib.h> #include <assert.h> +#include "CRT.h" /*{ #include "Panel.h" @@ -51,8 +52,10 @@ void MetersPanel_setMoving(MetersPanel* this, bool moving) { this->moving = moving; ((ListItem*)Panel_getSelected(super))->moving = moving; if (!moving) { + Panel_setSelectionColor(super, CRT_colors[PANEL_SELECTION_FOCUS]); Panel_setDefaultBar(super); } else { + Panel_setSelectionColor(super, CRT_colors[PANEL_SELECTION_FOLLOW]); super->currentBar = Meters_movingBar; } } |