From 874fc2ecb097b0f5c2b757bc7e5740b0d885b03f Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Thu, 18 Oct 2001 23:41:04 +0000 Subject: [PATCH] Get tooltips working with Fl_Slider and Fl_Counter-based widgets. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1640 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_Counter.cxx | 7 +++++-- src/Fl_Light_Button.cxx | 8 ++++---- src/Fl_Slider.cxx | 7 +++++-- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/src/Fl_Counter.cxx b/src/Fl_Counter.cxx index 93f8c0e3f..7be74038b 100644 --- a/src/Fl_Counter.cxx +++ b/src/Fl_Counter.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_Counter.cxx,v 1.8.2.3.2.1 2001/08/05 14:00:15 easysw Exp $" +// "$Id: Fl_Counter.cxx,v 1.8.2.3.2.2 2001/10/18 23:41:04 easysw Exp $" // // Counter widget for the Fast Light Tool Kit (FLTK). // @@ -159,6 +159,9 @@ int Fl_Counter::handle(int event) { case FL_UNFOCUS : damage(FL_DAMAGE_ALL); return 1; + case FL_ENTER : + case FL_LEAVE : + return 1; default: return 0; } @@ -183,5 +186,5 @@ Fl_Counter::Fl_Counter(int x, int y, int w, int h, const char* l) } // -// End of "$Id: Fl_Counter.cxx,v 1.8.2.3.2.1 2001/08/05 14:00:15 easysw Exp $". +// End of "$Id: Fl_Counter.cxx,v 1.8.2.3.2.2 2001/10/18 23:41:04 easysw Exp $". // diff --git a/src/Fl_Light_Button.cxx b/src/Fl_Light_Button.cxx index 21b8b40e2..a457375ee 100644 --- a/src/Fl_Light_Button.cxx +++ b/src/Fl_Light_Button.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_Light_Button.cxx,v 1.4.2.3.2.4 2001/09/30 22:40:56 easysw Exp $" +// "$Id: Fl_Light_Button.cxx,v 1.4.2.3.2.5 2001/10/18 23:41:04 easysw Exp $" // // Lighted button widget for the Fast Light Tool Kit (FLTK). // @@ -62,8 +62,8 @@ void Fl_Light_Button::draw() { draw_box(down_box(), x()+d, y()+d+1, W, W, color()); if (value()) { fl_color(col); - if (W > 14) { - fl_pie(x() + d + 4, y() + d + 5, W - 9, W - 9, 0.0, 360.0); + if (W > 12) { + fl_pie(x() + d + 4, y() + d + 5, W - 8, W - 8, 0.0, 360.0); } else { // Small circles don't draw well with some X servers... fl_rectf(x() + d + 5, y() + d + 5, 2, 4); @@ -105,5 +105,5 @@ Fl_Light_Button::Fl_Light_Button(int x, int y, int w, int h, const char* l) } // -// End of "$Id: Fl_Light_Button.cxx,v 1.4.2.3.2.4 2001/09/30 22:40:56 easysw Exp $". +// End of "$Id: Fl_Light_Button.cxx,v 1.4.2.3.2.5 2001/10/18 23:41:04 easysw Exp $". // diff --git a/src/Fl_Slider.cxx b/src/Fl_Slider.cxx index 9a2c44952..07b562661 100644 --- a/src/Fl_Slider.cxx +++ b/src/Fl_Slider.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_Slider.cxx,v 1.8.2.10.2.1 2001/08/05 14:00:15 easysw Exp $" +// "$Id: Fl_Slider.cxx,v 1.8.2.10.2.2 2001/10/18 23:41:04 easysw Exp $" // // Slider widget for the Fast Light Tool Kit (FLTK). // @@ -272,6 +272,9 @@ int Fl_Slider::handle(int event, int x, int y, int w, int h) { case FL_UNFOCUS : damage(FL_DAMAGE_ALL); return 1; + case FL_ENTER : + case FL_LEAVE : + return 1; default: return 0; } @@ -286,5 +289,5 @@ int Fl_Slider::handle(int event) { } // -// End of "$Id: Fl_Slider.cxx,v 1.8.2.10.2.1 2001/08/05 14:00:15 easysw Exp $". +// End of "$Id: Fl_Slider.cxx,v 1.8.2.10.2.2 2001/10/18 23:41:04 easysw Exp $". //