summaryrefslogtreecommitdiff
path: root/src/Fl_Counter.cxx
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>1998-12-02 18:43:28 +0000
committerMichael R Sweet <michael.r.sweet@gmail.com>1998-12-02 18:43:28 +0000
commit9c208650bf651d6d38780e55c34b8f870ebc3fe1 (patch)
tree3ea68eb460652a38f1abbf8b3ede9353b45517a8 /src/Fl_Counter.cxx
parente4c69fd44a49f769399856f1c00b3817726f0eab (diff)
Fixed inactive drawing code...
git-svn-id: file:///fltk/svn/fltk/trunk@121 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Counter.cxx')
-rw-r--r--src/Fl_Counter.cxx18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/Fl_Counter.cxx b/src/Fl_Counter.cxx
index 99bc92a32..fd82decfa 100644
--- a/src/Fl_Counter.cxx
+++ b/src/Fl_Counter.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Counter.cxx,v 1.5 1998/12/02 15:39:30 mike Exp $"
+// "$Id: Fl_Counter.cxx,v 1.6 1998/12/02 18:43:27 mike Exp $"
//
// Counter widget for the Fast Light Tool Kit (FLTK).
//
@@ -29,6 +29,7 @@
void Fl_Counter::draw() {
int i; Fl_Boxtype boxtype[5];
+ Fl_Color selcolor;
boxtype[0] = box();
if (boxtype[0] == FL_UP_BOX) boxtype[0] = FL_DOWN_BOX;
@@ -60,17 +61,22 @@ void Fl_Counter::draw() {
fl_draw(str, xx[0], y(), ww[0], h(), FL_ALIGN_CENTER);
if (!(damage()&FL_DAMAGE_ALL)) return; // only need to redraw text
+ if (active_r())
+ selcolor = selection_color();
+ else
+ selcolor = inactive(selection_color());
+
if (type() == FL_NORMAL_COUNTER) {
draw_box(boxtype[1], xx[1], y(), ww[1], h(), color());
- fl_draw_symbol("@-4<<", xx[1], y(), ww[1], h(), selection_color());
+ fl_draw_symbol("@-4<<", xx[1], y(), ww[1], h(), selcolor);
}
draw_box(boxtype[2], xx[2], y(), ww[2], h(), color());
- fl_draw_symbol("@-4<", xx[2], y(), ww[2], h(), selection_color());
+ fl_draw_symbol("@-4<", xx[2], y(), ww[2], h(), selcolor);
draw_box(boxtype[3], xx[3], y(), ww[3], h(), color());
- fl_draw_symbol("@-4>", xx[3], y(), ww[3], h(), selection_color());
+ fl_draw_symbol("@-4>", xx[3], y(), ww[3], h(), selcolor);
if (type() == FL_NORMAL_COUNTER) {
draw_box(boxtype[4], xx[4], y(), ww[4], h(), color());
- fl_draw_symbol("@-4>>", xx[4], y(), ww[4], h(), selection_color());
+ fl_draw_symbol("@-4>>", xx[4], y(), ww[4], h(), selcolor);
}
}
@@ -159,5 +165,5 @@ Fl_Counter::Fl_Counter(int x, int y, int w, int h, const char* l)
}
//
-// End of "$Id: Fl_Counter.cxx,v 1.5 1998/12/02 15:39:30 mike Exp $".
+// End of "$Id: Fl_Counter.cxx,v 1.6 1998/12/02 18:43:27 mike Exp $".
//