Skip to content

Commit

Permalink
FL_SHADOW_BOX/FRAME drew outside of the bounding box (STR #694)
Browse files Browse the repository at this point in the history
src/fl_boxtype.cxx:
    - Adjust box dw/dh for shadow box/frame types.

src/fl_shadow_box.cxx:
    - Adjust shadow box to draw inside the bounding box.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4033 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
  • Loading branch information
michaelrsweet committed Feb 6, 2005
1 parent b32fefd commit de9bea2
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
2 changes: 2 additions & 0 deletions CHANGES
@@ -1,6 +1,8 @@
CHANGES IN FLTK 1.1.7

- Documentation fixes (STR #648, STR #692)
- FL_SHADOW_BOX/FRAME drew outside of the bounding box
(STR #694)
- Fl_Widget::copy_label(NULL) didn't work (STR #707)
- Fl_Choice now allows click selection like
Fl_Menu_Button and Fl_Menubar (STR #706)
Expand Down
8 changes: 4 additions & 4 deletions src/fl_boxtype.cxx
@@ -1,5 +1,5 @@
//
// "$Id: fl_boxtype.cxx,v 1.8.2.4.2.14 2004/04/11 04:38:59 easysw Exp $"
// "$Id$"
//
// Box drawing code for the Fast Light Tool Kit (FLTK).
//
Expand Down Expand Up @@ -207,9 +207,9 @@ static struct {
{fl_engraved_frame, 2,2,4,4,1},
{fl_embossed_frame, 2,2,4,4,1},
{fl_border_box, 1,1,2,2,1},
{fl_border_box, 1,1,2,2,0}, // _FL_SHADOW_BOX,
{fl_border_box, 1,1,5,5,0}, // _FL_SHADOW_BOX,
{fl_border_frame, 1,1,2,2,1},
{fl_border_frame, 1,1,2,2,0}, // _FL_SHADOW_FRAME,
{fl_border_frame, 1,1,5,5,0}, // _FL_SHADOW_FRAME,
{fl_border_box, 1,1,2,2,0}, // _FL_ROUNDED_BOX,
{fl_border_box, 1,1,2,2,0}, // _FL_RSHADOW_BOX,
{fl_border_frame, 1,1,2,2,0}, // _FL_ROUNDED_FRAME
Expand Down Expand Up @@ -297,5 +297,5 @@ const {
}

//
// End of "$Id: fl_boxtype.cxx,v 1.8.2.4.2.14 2004/04/11 04:38:59 easysw Exp $".
// End of "$Id$".
//
12 changes: 6 additions & 6 deletions src/fl_shadow_box.cxx
@@ -1,5 +1,5 @@
//
// "$Id: fl_shadow_box.cxx,v 1.4.2.3.2.4 2004/04/11 04:39:00 easysw Exp $"
// "$Id$"
//
// Shadow box drawing routines for the Fast Light Tool Kit (FLTK).
//
Expand Down Expand Up @@ -30,15 +30,15 @@

static void fl_shadow_frame(int x, int y, int w, int h, Fl_Color c) {
fl_color(FL_DARK3);
fl_rectf(x+BW, y+h, w, BW);
fl_rectf(x+w, y+BW, BW, h);
fl_rectf(x+BW, y+h-BW, w, BW);
fl_rectf(x+w-BW, y+BW, BW, h - BW);
fl_color(c);
fl_rect(x,y,w,h);
fl_rect(x,y,w-BW,h-BW);
}

static void fl_shadow_box(int x, int y, int w, int h, Fl_Color c) {
fl_color(c);
fl_rectf(x+1,y+1,w-2,h-2);
fl_rectf(x+1,y+1,w-2-BW,h-2-BW);
fl_shadow_frame(x,y,w,h,FL_GRAY0);
}

Expand All @@ -50,5 +50,5 @@ Fl_Boxtype fl_define_FL_SHADOW_BOX() {
}

//
// End of "$Id: fl_shadow_box.cxx,v 1.4.2.3.2.4 2004/04/11 04:39:00 easysw Exp $".
// End of "$Id$".
//

0 comments on commit de9bea2

Please sign in to comment.