diff options
Diffstat (limited to 'src/Fl_Clock.cxx')
| -rw-r--r-- | src/Fl_Clock.cxx | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/Fl_Clock.cxx b/src/Fl_Clock.cxx index 8204a5a6a..0cc8e2dbf 100644 --- a/src/Fl_Clock.cxx +++ b/src/Fl_Clock.cxx @@ -71,24 +71,26 @@ static void rect(double x, double y, double w, double h) { } void Fl_Clock_Output::draw(int X, int Y, int W, int H) { - draw_box(box(), X, Y, W, H, type()==FL_ROUND_CLOCK ? FL_GRAY : color()); + Fl_Color box_color = type()==FL_ROUND_CLOCK ? FL_GRAY : color(); + Fl_Color shadow_color = fl_color_average(box_color, FL_BLACK, 0.5); + draw_box(box(), X, Y, W, H, box_color); fl_push_matrix(); fl_translate(X+W/2.0-.5, Y+H/2.0-.5); fl_scale((W-1)/28.0, (H-1)/28.0); if (type() == FL_ROUND_CLOCK) { fl_color(color()); fl_begin_polygon(); fl_circle(0,0,14); fl_end_polygon(); - fl_color(FL_BLACK); + fl_color(FL_FOREGROUND_COLOR); fl_begin_loop(); fl_circle(0,0,14); fl_end_loop(); } // draw the shadows: fl_push_matrix(); fl_translate(0.60, 0.60); - drawhands(FL_DARK3, FL_DARK3); + drawhands(shadow_color, shadow_color); fl_pop_matrix(); // draw the tick marks: fl_push_matrix(); - fl_color(FL_BLACK); // color was 52 + fl_color(FL_FOREGROUND_COLOR); // color was 52 for (int i=0; i<12; i++) { if (i==6) rect(-0.5, 9, 1, 2); else if (i==3 || i==0 || i== 9) rect(-0.5, 9.5, 1, 1); @@ -97,7 +99,7 @@ void Fl_Clock_Output::draw(int X, int Y, int W, int H) { } fl_pop_matrix(); // draw the hands: - drawhands(selection_color(), FL_GRAY0); // color was 54 + drawhands(selection_color(), FL_FOREGROUND_COLOR); // color was 54 fl_pop_matrix(); } |
