summaryrefslogtreecommitdiffstats
path: root/Panel.c
diff options
context:
space:
mode:
authorAdam Saponara <as@php.net>2020-10-30 21:56:16 -0400
committerAdam Saponara <as@php.net>2020-10-30 21:56:16 -0400
commitdde71c6637905e1707bd1020c93e930f4b0a480b (patch)
treeef65023b640f292ac50a7e0db38babbb78ef8eea /Panel.c
parentbbf01054bf943db4394027d77915f9625ebde81e (diff)
Highlight new and old processes (#74)
Diffstat (limited to 'Panel.c')
-rw-r--r--Panel.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/Panel.c b/Panel.c
index 02440d85..f3a48bc9 100644
--- a/Panel.c
+++ b/Panel.c
@@ -266,16 +266,18 @@ void Panel_draw(Panel* this, bool focus) {
Object_display(itemObj, &item);
int itemLen = RichString_sizeVal(item);
int amt = MINIMUM(itemLen - scrollH, this->w);
- bool selected = (i == this->selected);
- if (selected) {
- attrset(selectionColor);
- RichString_setAttr(&item, selectionColor);
+ if (i == this->selected) {
+ item.highlightAttr = selectionColor;
+ }
+ if (item.highlightAttr) {
+ attrset(item.highlightAttr);
+ RichString_setAttr(&item, item.highlightAttr);
this->selectedLen = itemLen;
}
mvhline(y + line, x, ' ', this->w);
if (amt > 0)
RichString_printoffnVal(item, y + line, x, scrollH, amt);
- if (selected)
+ if (item.highlightAttr)
attrset(CRT_colors[RESET_COLOR]);
RichString_end(item);
line++;

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