diff --git a/src/Color.cpp b/src/Color.cpp index 9dca6bc07..d91b4afc0 100644 --- a/src/Color.cpp +++ b/src/Color.cpp @@ -70,6 +70,7 @@ Color::Color (const Color& other) } //////////////////////////////////////////////////////////////////////////////// +/* Color::Color (unsigned int c) : value (0) { @@ -79,6 +80,7 @@ Color::Color (unsigned int c) value = c & (_COLOR_256 | _COLOR_HASBG | _COLOR_HASFG |_COLOR_UNDERLINE | _COLOR_BOLD | _COLOR_BRIGHT | _COLOR_BG | _COLOR_FG); } +*/ //////////////////////////////////////////////////////////////////////////////// // Supports the following constructs: @@ -225,6 +227,7 @@ Color::Color (const std::string& spec) } //////////////////////////////////////////////////////////////////////////////// +/* Color::Color (color_id fg) : value (0) { @@ -234,6 +237,7 @@ Color::Color (color_id fg) value |= fg; } } +*/ //////////////////////////////////////////////////////////////////////////////// Color::Color (color_id fg, color_id bg) diff --git a/src/Color.h b/src/Color.h index 9f6b80c08..c3f8db3d9 100644 --- a/src/Color.h +++ b/src/Color.h @@ -46,9 +46,9 @@ public: Color (); Color (const Color&); - Color (unsigned int); // 256 | UNDERLINE | BOLD | BRIGHT | (BG << 8) | FG +// Color (unsigned int); // 256 | UNDERLINE | BOLD | BRIGHT | (BG << 8) | FG Color (const std::string&); // "red on bright black" - Color (color_id); // fg. +// Color (color_id); // fg. Color (color_id, color_id); // fg, bg. Color (color_id, color_id, bool, bool, bool); // fg, bg, underline, bold, bright ~Color (); diff --git a/src/TDB.cpp b/src/TDB.cpp index 16f4754b1..09087a195 100644 --- a/src/TDB.cpp +++ b/src/TDB.cpp @@ -582,7 +582,7 @@ void TDB::undo () row = table.addRow (); table.addCell (row, 0, *name); table.addCell (row, 1, renderAttribute (*name, before.get (*name))); - table.setCellColor (row, 1, Color (Color::red)); + table.setCellColor (row, 1, Color (Color::red, Color::nocolor)); } foreach (name, before) @@ -599,8 +599,8 @@ void TDB::undo () if (priorValue != currentValue) { - table.setCellColor (row, 1, Color (Color::red)); - table.setCellColor (row, 2, Color (Color::green)); + table.setCellColor (row, 1, Color (Color::red, Color::nocolor)); + table.setCellColor (row, 2, Color (Color::green, Color::nocolor)); } } } @@ -610,7 +610,7 @@ void TDB::undo () row = table.addRow (); table.addCell (row, 0, *name); table.addCell (row, 2, renderAttribute (*name, after.get (*name))); - table.setCellColor (row, 2, Color (Color::green)); + table.setCellColor (row, 2, Color (Color::green, Color::nocolor)); } } else @@ -621,7 +621,7 @@ void TDB::undo () row = table.addRow (); table.addCell (row, 0, name->first); table.addCell (row, 2, renderAttribute (name->first, after.get (name->first))); - table.setCellColor (row, 2, Color (Color::green)); + table.setCellColor (row, 2, Color (Color::green, Color::nocolor)); } } diff --git a/src/report.cpp b/src/report.cpp index c32b6e046..bc66b5cb1 100644 --- a/src/report.cpp +++ b/src/report.cpp @@ -886,8 +886,8 @@ int handleReportHistory (std::string &outs) table.addCell (row, 5, net); if ((context.config.get ("color", true) || context.config.get (std::string ("_forcecolor"), false)) && net) - table.setCellColor (row, 5, net > 0 ? Color (Color::red) : - Color (Color::green)); + table.setCellColor (row, 5, net > 0 ? Color (Color::red, Color::nocolor, false, false, false) : + Color (Color::green, Color::nocolor, false, false, false)); } if (table.rowCount ()) @@ -989,9 +989,9 @@ int handleReportGHistory (std::string &outs) else table.setTableDashedUnderline (); - Color color_added (Color::black, Color::red); - Color color_completed (Color::black, Color::green); - Color color_deleted (Color::black, Color::yellow); + Color color_added (Color::black, Color::red, false, false, false); + Color color_completed (Color::black, Color::green, false, false, false); + Color color_deleted (Color::black, Color::yellow, false, false, false); // Determine the longest line, and the longest "added" line. int maxAddedLine = 0; @@ -1426,7 +1426,7 @@ std::string renderMonths ( today.day () == d && today.month () == months.at (mpl) && today.year () == years.at (mpl)) - table.setCellColor (row, thisCol, Color (Color::cyan)); + table.setCellColor (row, thisCol, Color (Color::cyan, Color::nocolor, false, false, false)); foreach (task, all) { @@ -1440,7 +1440,7 @@ std::string renderMonths ( due.month () == months.at (mpl) && due.year () == years.at (mpl)) { - Color c (Color::black, (due < today ? Color::red : Color::yellow)); + Color c (Color::black, (due < today ? Color::red : Color::yellow), false, false, false); table.setCellColor (row, thisCol, c); } } @@ -1620,9 +1620,9 @@ int handleReportCalendar (std::string &outs) } } - Color color_today (Color::cyan); - Color color_due (Color::black, Color::yellow); - Color color_overdue (Color::black, Color::red); + Color color_today (Color::cyan, Color::nocolor, false, false, false); + Color color_due (Color::black, Color::yellow, false, false, false); + Color color_overdue (Color::black, Color::red, false, false, false); if (context.config.get ("color", true) || context.config.get (std::string ("_forcecolor"), false)) out << "Legend: "