mirror of
https://github.com/fltk/fltk.git
synced 2026-06-06 00:22:42 +08:00
Better UNFOCUS redraw() fix for Fl_Button.
Adjust plastic boxtype borders. Update dependencies. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1851 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
+13
-3
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// "$Id: Fl_Button.cxx,v 1.4.2.6.2.7 2001/12/14 16:48:13 easysw Exp $"
|
// "$Id: Fl_Button.cxx,v 1.4.2.6.2.8 2001/12/16 12:37:02 easysw Exp $"
|
||||||
//
|
//
|
||||||
// Button widget for the Fast Light Tool Kit (FLTK).
|
// Button widget for the Fast Light Tool Kit (FLTK).
|
||||||
//
|
//
|
||||||
@@ -26,6 +26,7 @@
|
|||||||
#include <FL/Fl.H>
|
#include <FL/Fl.H>
|
||||||
#include <FL/Fl_Button.H>
|
#include <FL/Fl_Button.H>
|
||||||
#include <FL/Fl_Group.H>
|
#include <FL/Fl_Group.H>
|
||||||
|
#include <FL/Fl_Window.H>
|
||||||
|
|
||||||
// There are a lot of subclasses, named Fl_*_Button. Some of
|
// There are a lot of subclasses, named Fl_*_Button. Some of
|
||||||
// them are implemented by setting the type() value and testing it
|
// them are implemented by setting the type() value and testing it
|
||||||
@@ -108,7 +109,16 @@ int Fl_Button::handle(int event) {
|
|||||||
case FL_FOCUS :
|
case FL_FOCUS :
|
||||||
case FL_UNFOCUS :
|
case FL_UNFOCUS :
|
||||||
if (Fl::visible_focus()) {
|
if (Fl::visible_focus()) {
|
||||||
if (event == FL_UNFOCUS && box() == FL_NO_BOX) parent()->redraw();
|
if (event == FL_UNFOCUS && box() == FL_NO_BOX) {
|
||||||
|
// Buttons with the FL_NO_BOX boxtype need a parent to
|
||||||
|
// redraw, since it is responsible for redrawing the
|
||||||
|
// background...
|
||||||
|
Fl_Widget *p;
|
||||||
|
for (p = parent(); p; p = p->parent())
|
||||||
|
if (p->box() != FL_NO_BOX) break;
|
||||||
|
if (p) p->redraw();
|
||||||
|
else window()->redraw();
|
||||||
|
}
|
||||||
else redraw();
|
else redraw();
|
||||||
return 1;
|
return 1;
|
||||||
} else return 0;
|
} else return 0;
|
||||||
@@ -139,5 +149,5 @@ Fl_Button::Fl_Button(int x,int y,int w,int h, const char *l)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// End of "$Id: Fl_Button.cxx,v 1.4.2.6.2.7 2001/12/14 16:48:13 easysw Exp $".
|
// End of "$Id: Fl_Button.cxx,v 1.4.2.6.2.8 2001/12/16 12:37:02 easysw Exp $".
|
||||||
//
|
//
|
||||||
|
|||||||
+6
-6
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// "$Id: fl_boxtype.cxx,v 1.8.2.4.2.5 2001/12/14 16:48:13 easysw Exp $"
|
// "$Id: fl_boxtype.cxx,v 1.8.2.4.2.6 2001/12/16 12:37:02 easysw Exp $"
|
||||||
//
|
//
|
||||||
// Box drawing code for the Fast Light Tool Kit (FLTK).
|
// Box drawing code for the Fast Light Tool Kit (FLTK).
|
||||||
//
|
//
|
||||||
@@ -222,10 +222,10 @@ static struct {
|
|||||||
{fl_border_box, 1,1,2,2,0}, // _FL_OVAL_SHADOW_BOX,
|
{fl_border_box, 1,1,2,2,0}, // _FL_OVAL_SHADOW_BOX,
|
||||||
{fl_border_frame, 1,1,2,2,0}, // _FL_OVAL_FRAME
|
{fl_border_frame, 1,1,2,2,0}, // _FL_OVAL_FRAME
|
||||||
{fl_rectf, 0,0,0,0,0}, // _FL_OVAL_FLAT_BOX,
|
{fl_rectf, 0,0,0,0,0}, // _FL_OVAL_FLAT_BOX,
|
||||||
{fl_up_box, 4,4,7,6,0}, // _FL_PLASTIC_UP_BOX,
|
{fl_up_box, 4,4,8,8,0}, // _FL_PLASTIC_UP_BOX,
|
||||||
{fl_down_box, 4,4,7,6,0}, // _FL_PLASTIC_DOWN_BOX,
|
{fl_down_box, 4,4,8,8,0}, // _FL_PLASTIC_DOWN_BOX,
|
||||||
{fl_up_frame, 4,4,7,6,0}, // _FL_PLASTIC_UP_FRAME,
|
{fl_up_frame, 2,2,4,4,0}, // _FL_PLASTIC_UP_FRAME,
|
||||||
{fl_down_frame, 4,4,7,6,0}, // _FL_PLASTIC_DOWN_FRAME,
|
{fl_down_frame, 2,2,4,4,0}, // _FL_PLASTIC_DOWN_FRAME,
|
||||||
{fl_up_box, 3,3,6,6,0}, // FL_FREE_BOX+0
|
{fl_up_box, 3,3,6,6,0}, // FL_FREE_BOX+0
|
||||||
{fl_down_box, 3,3,6,6,0}, // FL_FREE_BOX+1
|
{fl_down_box, 3,3,6,6,0}, // FL_FREE_BOX+1
|
||||||
{fl_up_box, 3,3,6,6,0}, // FL_FREE_BOX+2
|
{fl_up_box, 3,3,6,6,0}, // FL_FREE_BOX+2
|
||||||
@@ -291,5 +291,5 @@ const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// End of "$Id: fl_boxtype.cxx,v 1.8.2.4.2.5 2001/12/14 16:48:13 easysw Exp $".
|
// End of "$Id: fl_boxtype.cxx,v 1.8.2.4.2.6 2001/12/16 12:37:02 easysw Exp $".
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ Fl_Box.o: ../FL/Fl_Widget.H ../FL/Fl_Box.H ../FL/Fl_Widget.H
|
|||||||
Fl_Box.o: ../FL/Enumerations.H ../FL/Fl_Export.H
|
Fl_Box.o: ../FL/Enumerations.H ../FL/Fl_Export.H
|
||||||
Fl_Button.o: ../FL/Fl.H ../FL/Enumerations.H ../FL/Fl_Export.H
|
Fl_Button.o: ../FL/Fl.H ../FL/Enumerations.H ../FL/Fl_Export.H
|
||||||
Fl_Button.o: ../FL/Fl_Button.H ../FL/Fl_Widget.H ../FL/Fl_Group.H
|
Fl_Button.o: ../FL/Fl_Button.H ../FL/Fl_Widget.H ../FL/Fl_Group.H
|
||||||
|
Fl_Button.o: ../FL/Fl_Window.H ../FL/Fl_Group.H
|
||||||
Fl_Chart.o: ../FL/math.h ../FL/Fl.H ../FL/Enumerations.H ../FL/Fl_Export.H
|
Fl_Chart.o: ../FL/math.h ../FL/Fl.H ../FL/Enumerations.H ../FL/Fl_Export.H
|
||||||
Fl_Chart.o: ../FL/Fl_Chart.H ../FL/Fl_Widget.H ../FL/fl_draw.H
|
Fl_Chart.o: ../FL/Fl_Chart.H ../FL/Fl_Widget.H ../FL/fl_draw.H
|
||||||
Fl_Check_Browser.o: ../FL/fl_draw.H ../FL/Enumerations.H ../FL/Fl_Export.H
|
Fl_Check_Browser.o: ../FL/fl_draw.H ../FL/Enumerations.H ../FL/Fl_Export.H
|
||||||
|
|||||||
Reference in New Issue
Block a user