summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Fl_Clock.cxx16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/Fl_Clock.cxx b/src/Fl_Clock.cxx
index df241e8aa..4f8d4ee80 100644
--- a/src/Fl_Clock.cxx
+++ b/src/Fl_Clock.cxx
@@ -74,7 +74,6 @@ static void rect(double x, double y, double w, double h) {
*/
void Fl_Clock_Output::draw(int X, int Y, int W, int H) {
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);
@@ -85,11 +84,16 @@ void Fl_Clock_Output::draw(int X, int Y, int W, int H) {
fl_color(active_r() ? FL_FOREGROUND_COLOR : fl_inactive(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(shadow_color, shadow_color);
- fl_pop_matrix();
+ if (shadow_) {
+ Fl_Color shadow_color = fl_color_average(box_color, FL_BLACK, 0.5);
+ fl_push_matrix();
+ fl_translate(0.60, 0.60);
+ drawhands(shadow_color, shadow_color);
+ fl_pop_matrix();
+ }
+
// draw the tick marks:
fl_push_matrix();
fl_color(active_r() ? FL_FOREGROUND_COLOR : fl_inactive(FL_FOREGROUND_COLOR));
@@ -100,6 +104,7 @@ void Fl_Clock_Output::draw(int X, int Y, int W, int H) {
fl_rotate(-30);
}
fl_pop_matrix();
+
// draw the hands:
drawhands(selection_color(), FL_FOREGROUND_COLOR); // color was 54
fl_pop_matrix();
@@ -160,6 +165,7 @@ Fl_Clock_Output::Fl_Clock_Output(int X, int Y, int W, int H, const char *L)
minute_ = 0;
second_ = 0;
value_ = 0;
+ shadow_ = 1;
}
////////////////////////////////////////////////////////////////