Author: cwarrens Date: 2009-08-24 03:55:48 -0700 (Mon, 24 Aug 2009) New Revision: 6842 Log: Updated TextDisplay to ensure line numbers remain visible when a dark background editor color has been selected
Modified: trunk/src/TextDisplay.cxx Modified: trunk/src/TextDisplay.cxx =================================================================== --- trunk/src/TextDisplay.cxx 2009-08-03 06:26:32 UTC (rev 6841) +++ trunk/src/TextDisplay.cxx 2009-08-24 10:55:48 UTC (rev 6842) @@ -2278,7 +2278,8 @@ fltk::push_clip(clipRect); // Erase background - fltk::setcolor(fltk::lerp(color(), fltk::BLACK, .1f)); + Color bg = fltk::lerp(color(), fltk::BLACK, .1f); + fltk::setcolor(bg); fltk::fillrect(clipRect); // Draw separator line @@ -2286,7 +2287,7 @@ fltk::drawline(clipRect.r()-1, clipRect.y(), clipRect.r()-1, clipRect.b()); // Draw text - fltk::setcolor(fltk::BLACK); + fltk::setcolor(fltk::contrast(color(), bg)); fltk::setfont(textfont(), textsize()); /* Draw the line numbers, aligned to the text */ _______________________________________________ fltk-commit mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk-commit
