Highlight week number when the calendar is selected

Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
This commit is contained in:
Lukas Fleischer 2015-04-10 09:48:29 +02:00
parent 7fea5451ad
commit f07ef77437

View File

@ -378,8 +378,12 @@ static void draw_week_number(struct scrollwin *sw, struct tm t)
WINS_CALENDAR_LOCK; WINS_CALENDAR_LOCK;
werase(sw_cal.inner); werase(sw_cal.inner);
custom_apply_attr(sw->inner, ATTR_HIGHEST); custom_apply_attr(sw->inner, ATTR_HIGHEST);
if (wins_slctd() == CAL)
wattron(sw->win, COLOR_PAIR(COLR_CUSTOM));
mvwprintw(sw->win, conf.compact_panels ? 0 : 2, sw->w - 9, mvwprintw(sw->win, conf.compact_panels ? 0 : 2, sw->w - 9,
"(# %02d)", weeknum); "(# %02d)", weeknum);
if (wins_slctd() == CAL)
wattroff(sw->win, COLOR_PAIR(COLR_CUSTOM));
custom_remove_attr(sw->inner, ATTR_HIGHEST); custom_remove_attr(sw->inner, ATTR_HIGHEST);
WINS_CALENDAR_UNLOCK; WINS_CALENDAR_UNLOCK;
} }