summaryrefslogtreecommitdiff
path: root/src/Fl_Dial.cxx
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>2006-09-20 03:03:14 +0000
committerMichael R Sweet <michael.r.sweet@gmail.com>2006-09-20 03:03:14 +0000
commit1d23087fc955e75c1a9cbab28f05e1575e6c071c (patch)
tree89ebf6f3a73d7fcf889956b3dd1686a882ce83eb /src/Fl_Dial.cxx
parent5be931cebd13db1ea3aab6234eaeb00e07ad467e (diff)
Fix inactive drawing of the new GTK+ box types.
Fix inactive drawing of Fl_Clock and Fl_Dial widgets. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5472 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Dial.cxx')
-rw-r--r--src/Fl_Dial.cxx23
1 files changed, 15 insertions, 8 deletions
diff --git a/src/Fl_Dial.cxx b/src/Fl_Dial.cxx
index de77cb268..3b76460d6 100644
--- a/src/Fl_Dial.cxx
+++ b/src/Fl_Dial.cxx
@@ -3,7 +3,7 @@
//
// Circular dial widget for the Fast Light Tool Kit (FLTK).
//
-// Copyright 1998-2005 by Bill Spitzak and others.
+// Copyright 1998-2006 by Bill Spitzak and others.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
@@ -44,25 +44,30 @@ void Fl_Dial::draw(int X, int Y, int W, int H) {
// foo: draw this nicely in certain round box types
int foo = (box() > _FL_ROUND_UP_BOX && Fl::box_dx(box()));
if (foo) {X--; Y--; W+=2; H+=2;}
- fl_color(color());
+ if (active_r()) fl_color(color());
+ else fl_color(fl_inactive(color()));
fl_pie(X, Y, W, H, 270-a1, angle > a1 ? 360+270-angle : 270-360-angle);
- fl_color(selection_color());
+ if (active_r()) fl_color(selection_color());
+ else fl_color(fl_inactive(selection_color()));
fl_pie(X, Y, W, H, 270-angle, 270-a1);
if (foo) {
- fl_color(FL_FOREGROUND_COLOR);
+ if (active_r()) fl_color(FL_FOREGROUND_COLOR);
+ else fl_color(fl_inactive(FL_FOREGROUND_COLOR));
fl_arc(X, Y, W, H, 0, 360);
}
return;
}
if (!(damage()&FL_DAMAGE_ALL)) {
- fl_color(color());
+ if (active_r()) fl_color(color());
+ else fl_color(fl_inactive(color()));
fl_pie(X+1, Y+1, W-2, H-2, 0, 360);
}
fl_push_matrix();
fl_translate(X+W/2-.5, Y+H/2-.5);
fl_scale(W-1, H-1);
fl_rotate(45-angle);
- fl_color(selection_color());
+ if (active_r()) fl_color(selection_color());
+ else fl_color(fl_inactive(selection_color()));
if (type()) { // FL_LINE_DIAL
fl_begin_polygon();
fl_vertex(0.0, 0.0);
@@ -70,7 +75,8 @@ void Fl_Dial::draw(int X, int Y, int W, int H) {
fl_vertex(-0.25, 0.25);
fl_vertex(0.0, 0.04);
fl_end_polygon();
- fl_color(FL_FOREGROUND_COLOR);
+ if (active_r()) fl_color(FL_FOREGROUND_COLOR);
+ else fl_color(fl_inactive(FL_FOREGROUND_COLOR));
fl_begin_loop();
fl_vertex(0.0, 0.0);
fl_vertex(-0.04, 0.0);
@@ -79,7 +85,8 @@ void Fl_Dial::draw(int X, int Y, int W, int H) {
fl_end_loop();
} else {
fl_begin_polygon(); fl_circle(-0.20, 0.20, 0.07); fl_end_polygon();
- fl_color(FL_FOREGROUND_COLOR);
+ if (active_r()) fl_color(FL_FOREGROUND_COLOR);
+ else fl_color(fl_inactive(FL_FOREGROUND_COLOR));
fl_begin_loop(); fl_circle(-0.20, 0.20, 0.07); fl_end_loop();
}
fl_pop_matrix();