diff options
| author | Michael R Sweet <michael.r.sweet@gmail.com> | 1999-01-13 15:57:38 +0000 |
|---|---|---|
| committer | Michael R Sweet <michael.r.sweet@gmail.com> | 1999-01-13 15:57:38 +0000 |
| commit | c31a0f7deed55e684ce1ee9facb5899fc0f071d0 (patch) | |
| tree | 7ed211d6600c57614c07ebaf9f4ee5bf2516ca6a | |
| parent | 500be2e8aaa07cede2734a3cd2f566d1b970b812 (diff) | |
More color fixes from Bill.
git-svn-id: file:///fltk/svn/fltk/trunk@214 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
| -rw-r--r-- | src/Fl_Input_.cxx | 7 | ||||
| -rw-r--r-- | src/Fl_get_system_colors.cxx | 18 |
2 files changed, 8 insertions, 17 deletions
diff --git a/src/Fl_Input_.cxx b/src/Fl_Input_.cxx index d98aa11bd..d4b68f796 100644 --- a/src/Fl_Input_.cxx +++ b/src/Fl_Input_.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_Input_.cxx,v 1.14 1999/01/07 19:17:21 mike Exp $" +// "$Id: Fl_Input_.cxx,v 1.15 1999/01/13 15:57:38 mike Exp $" // // Common input widget routines for the Fast Light Tool Kit (FLTK). // @@ -230,8 +230,7 @@ void Fl_Input_::drawtext(int X, int Y, int W, int H) { } fl_clip(X, Y, W, H); - Fl_Color color = - active_r() ? contrast(textcolor(),this->color()) : inactive(textcolor()); + Fl_Color color = active_r() ? textcolor() : inactive(textcolor()); p = value(); // visit each line and draw it: @@ -736,5 +735,5 @@ Fl_Input_::~Fl_Input_() { } // -// End of "$Id: Fl_Input_.cxx,v 1.14 1999/01/07 19:17:21 mike Exp $". +// End of "$Id: Fl_Input_.cxx,v 1.15 1999/01/13 15:57:38 mike Exp $". // diff --git a/src/Fl_get_system_colors.cxx b/src/Fl_get_system_colors.cxx index 31edcb299..4f3f898b2 100644 --- a/src/Fl_get_system_colors.cxx +++ b/src/Fl_get_system_colors.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_get_system_colors.cxx,v 1.5 1999/01/07 19:17:32 mike Exp $" +// "$Id: Fl_get_system_colors.cxx,v 1.6 1999/01/13 15:57:38 mike Exp $" // // System color support for the Fast Light Tool Kit (FLTK). // @@ -44,21 +44,13 @@ void Fl::background(uchar r, uchar g, uchar b) { } } -static void set_others() { - uchar r,g,b; Fl::get_color(FL_BLACK,r,g,b); - uchar r1,g1,b1; Fl::get_color(FL_WHITE,r1,g1,b1); - Fl::set_color(FL_INACTIVE_COLOR,(2*r+r1)/3, (2*g+g1)/3, (2*b+b1)/3); - Fl::set_color(FL_SELECTION_COLOR,(2*r1+r)/3, (2*g1+g)/3, (2*b1+b)/3); -} - void Fl::foreground(uchar r, uchar g, uchar b) { Fl::set_color(FL_BLACK,r,g,b); - set_others(); } void Fl::background2(uchar r, uchar g, uchar b) { Fl::set_color(FL_WHITE,r,g,b); - set_others(); + Fl::set_color(FL_BLACK,get_color(contrast(FL_BLACK,FL_WHITE))); } // these are set by Fl::args() and override any system colors: @@ -103,9 +95,9 @@ getsyscolor(int what, const char* arg, void (*func)(uchar,uchar,uchar)) } void Fl::get_system_colors() { + getsyscolor(COLOR_WINDOW, fl_bg2,Fl::background2); getsyscolor(COLOR_WINDOWTEXT, fl_fg, Fl::foreground); getsyscolor(COLOR_BTNFACE, fl_bg, Fl::background); - getsyscolor(COLOR_WINDOW, fl_bg2,Fl::background2); } #else @@ -127,13 +119,13 @@ getsyscolor(const char *arg, void (*func)(uchar,uchar,uchar)) { void Fl::get_system_colors() { fl_open_display(); + getsyscolor(fl_bg2,Fl::background2); getsyscolor(fl_fg, Fl::foreground); getsyscolor(fl_bg, Fl::background); - getsyscolor(fl_bg2,Fl::background2); } #endif // -// End of "$Id: Fl_get_system_colors.cxx,v 1.5 1999/01/07 19:17:32 mike Exp $". +// End of "$Id: Fl_get_system_colors.cxx,v 1.6 1999/01/13 15:57:38 mike Exp $". // |
