diff options
author | Frederic Culot <calcurse@culot.org> | 2009-06-20 16:54:44 +0000 |
---|---|---|
committer | Frederic Culot <calcurse@culot.org> | 2009-06-20 16:54:44 +0000 |
commit | 45a4d5446a125b99b11c28daa004a0495c5c560d (patch) | |
tree | 9f3b219a548db820313df68d03e4ca2703a09405 | |
parent | 78c04955873fce8513ffc5e2318361f4fed0ea38 (diff) | |
download | calcurse-45a4d5446a125b99b11c28daa004a0495c5c560d.zip |
Day names and selected date colour now follow user's theme.
-rwxr-xr-x | ChangeLog | 4 | ||||
-rwxr-xr-x | src/calendar.c | 20 |
2 files changed, 14 insertions, 10 deletions
@@ -5,6 +5,10 @@ * src/custom.c: fix a bug that caused calcurse to freeze under OpenBSD when changing theme color from within the configuration screen + + * src/calendar.c (calendar_update_panel): day names and selected + date are now in the same colour as user's theme inside calendar + panel 2009-06-01 Frederic Culot <frederic@culot.org> diff --git a/src/calendar.c b/src/calendar.c index 6728a84..2836a85 100755 --- a/src/calendar.c +++ b/src/calendar.c @@ -1,4 +1,4 @@ -/* $calcurse: calendar.c,v 1.22 2009/01/24 20:41:52 culot Exp $ */ +/* $calcurse: calendar.c,v 1.23 2009/06/20 16:54:44 culot Exp $ */ /* * Calcurse - text-based organizer @@ -245,20 +245,20 @@ calendar_update_panel (WINDOW *cwin) c_day_1 = (int) ((ymd_to_scalar (yr, mo, 1 + sunday_first) - (long) 1) % 7L); /* Write the current month and year on top of the calendar */ - custom_apply_attr (cwin, ATTR_HIGH); + custom_apply_attr (cwin, ATTR_HIGHEST); mvwprintw (cwin, ofs_y, (CALWIDTH - (strlen (_(monthnames[mo - 1])) + 5)) / 2, "%s %d", _(monthnames[mo - 1]), slctd_day.yyyy); - custom_remove_attr (cwin, ATTR_HIGH); + custom_remove_attr (cwin, ATTR_HIGHEST); ++ofs_y; /* print the days, with regards to the first day of the week */ - custom_apply_attr (cwin, ATTR_HIGH); + custom_apply_attr (cwin, ATTR_HIGHEST); for (j = 0; j < 7; j++) { mvwprintw (cwin, ofs_y, ofs_x + 4 * j, "%s", _(daynames[1 + j - sunday_first])); } - custom_remove_attr (cwin, ATTR_HIGH); + custom_remove_attr (cwin, ATTR_HIGHEST); day_1_sav = (c_day_1 + 1) * 3 + c_day_1 - 7; @@ -293,21 +293,21 @@ calendar_update_panel (WINDOW *cwin) || (current_day.mm != slctd_day.mm) || (current_day.yyyy != slctd_day.yyyy))) { - /* This is the selected day, print it in red. */ - custom_apply_attr (cwin, ATTR_MIDDLE); + /* This is the selected day, print it according to user's theme. */ + custom_apply_attr (cwin, ATTR_HIGHEST); mvwprintw (cwin, ofs_y + 1, ofs_x + day_1_sav + 4 * c_day + 1, "%2d", c_day); - custom_remove_attr (cwin, ATTR_MIDDLE); + custom_remove_attr (cwin, ATTR_HIGHEST); } else if (c_day == slctd_day.dd && current_day.dd == slctd_day.dd && current_day.mm == slctd_day.mm && current_day.yyyy == slctd_day.yyyy) { /* today is the selected day */ - custom_apply_attr (cwin, ATTR_MIDDLE); + custom_apply_attr (cwin, ATTR_HIGHEST); mvwprintw (cwin, ofs_y + 1, ofs_x + day_1_sav + 4 * c_day + 1, "%2d", c_day); - custom_remove_attr (cwin, ATTR_MIDDLE); + custom_remove_attr (cwin, ATTR_HIGHEST); } else if (item_this_day) { |