Fixed documentation for Fl_Progress (STR #2209) and changed deprecated

color2() calls to selection_color().


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6794 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Albrecht Schlosser 2009-06-27 09:29:36 +00:00
parent 85dc567187
commit 3cac153c5b
2 changed files with 13 additions and 8 deletions

View File

@ -1,5 +1,6 @@
CHANGES IN FLTK 1.3.0
- Fixed documentation for Fl_Progress (STR #2209)
- Fluid printing used wrong colors under Windows (STR #2195)
- Updated documentation for Fl_Input_
- Fixed fl_draw_image to obey the alpha channel, hoping that

View File

@ -47,7 +47,7 @@
//
// 'Fl_Progress::draw()' - Draw the check button.
// 'Fl_Progress::draw()' - Draw the progress bar.
//
/** Draws the progress bar. */
@ -76,10 +76,10 @@ void Fl_Progress::draw()
// Draw the box and label...
if (progress > 0) {
Fl_Color c = labelcolor();
labelcolor(fl_contrast(labelcolor(), color2()));
labelcolor(fl_contrast(labelcolor(), selection_color()));
fl_push_clip(x(), y(), progress + bx, h());
draw_box(box(), x(), y(), w(), h(), active_r() ? color2() : fl_inactive(color2()));
draw_box(box(), x(), y(), w(), h(), active_r() ? selection_color() : fl_inactive(selection_color()));
draw_label(tx, y() + by, tw, h() - bh);
fl_pop_clip();
@ -99,12 +99,16 @@ void Fl_Progress::draw()
/**
The constructor creates the progress bar using the position,
size, and label.
<P> The inherited destructor removes the progress bar.
The constructor creates the progress bar using the position, size, and label.
You can set the background color with color() and the
progress bar color with selection_color(), or you can set both colors
together with color(unsigned bg, unsigned sel).
The default colors are FL_BACKGROUND2_COLOR and FL_YELLOW, resp.
*/
Fl_Progress::Fl_Progress(int X, int Y, int W, int H, const char* l)
: Fl_Widget(X, Y, W, H, l) {
Fl_Progress::Fl_Progress(int X, int Y, int W, int H, const char* L)
: Fl_Widget(X, Y, W, H, L) {
align(FL_ALIGN_INSIDE);
box(FL_DOWN_BOX);
color(FL_BACKGROUND2_COLOR, FL_YELLOW);