The slider was not drawing the bar inactive.

git-svn-id: file:///fltk/svn/fltk/trunk@91 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Michael R Sweet 1998-11-18 17:26:44 +00:00
parent 5098fc05af
commit 402527311e
2 changed files with 9 additions and 8 deletions

View File

@ -1,5 +1,5 @@
//
// "$Id: Fl_Input_.cxx,v 1.8 1998/11/17 18:43:24 mike Exp $"
// "$Id: Fl_Input_.cxx,v 1.9 1998/11/18 17:26:43 mike Exp $"
//
// Common input widget routines for the Fast Light Tool Kit (FLTK).
//
@ -492,11 +492,11 @@ int Fl_Input_::replace(int b, int e, const char* text, int ilen) {
undoinsert -= e-b;
} else {
undobuffersize(e-b);
memmove(undobuffer, value_+b, e-b);
memcpy(undobuffer, value_+b, e-b);
undocut = e-b;
undoinsert = 0;
}
memcpy(buffer+b, buffer+e, size_-e+1);
memmove(buffer+b, buffer+e, size_-e+1);
size_ -= e-b;
undowidget = this;
undoat = b;
@ -727,5 +727,5 @@ Fl_Input_::~Fl_Input_() {
}
//
// End of "$Id: Fl_Input_.cxx,v 1.8 1998/11/17 18:43:24 mike Exp $".
// End of "$Id: Fl_Input_.cxx,v 1.9 1998/11/18 17:26:43 mike Exp $".
//

View File

@ -1,5 +1,5 @@
//
// "$Id: Fl_Slider.cxx,v 1.4 1998/10/21 14:20:22 mike Exp $"
// "$Id: Fl_Slider.cxx,v 1.5 1998/11/18 17:26:44 mike Exp $"
//
// Slider widget for the Fast Light Tool Kit (FLTK).
//
@ -85,10 +85,11 @@ int Fl_Slider::scrollvalue(int p, int w, int t, int l) {
void Fl_Slider::draw_bg(int x, int y, int w, int h) {
draw_box(box(), x, y, w, h, color());
int BW = Fl::box_dx(box());
int black = active() ? FL_BLACK : inactive(FL_BLACK);
if (type() == FL_VERT_NICE_SLIDER) {
draw_box(FL_THIN_DOWN_BOX, x+w/2-2, y+BW, 4, h-2*BW, FL_BLACK);
draw_box(FL_THIN_DOWN_BOX, x+w/2-2, y+BW, 4, h-2*BW, black);
} else if (type() == FL_HOR_NICE_SLIDER) {
draw_box(FL_THIN_DOWN_BOX, x+BW, y+h/2-2, w-2*BW, 4, FL_BLACK);
draw_box(FL_THIN_DOWN_BOX, x+BW, y+h/2-2, w-2*BW, 4, black);
}
}
@ -227,5 +228,5 @@ int Fl_Slider::handle(int event) {
}
//
// End of "$Id: Fl_Slider.cxx,v 1.4 1998/10/21 14:20:22 mike Exp $".
// End of "$Id: Fl_Slider.cxx,v 1.5 1998/11/18 17:26:44 mike Exp $".
//