mirror of
https://github.com/fltk/fltk.git
synced 2026-05-30 04:55:29 +08:00
Middle mouse click/drag moves scrollbar directly to the mouse position.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2642 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
@@ -1,5 +1,8 @@
|
|||||||
CHANGES IN FLTK 1.1.0
|
CHANGES IN FLTK 1.1.0
|
||||||
|
|
||||||
|
- Clicking/dragging the middle mouse button in a
|
||||||
|
scrollbar now moves directly to that scroll position,
|
||||||
|
matching the behavior of other toolkits.
|
||||||
- Added some more range checking to the Fl_Text_Display
|
- Added some more range checking to the Fl_Text_Display
|
||||||
widget.
|
widget.
|
||||||
- The editor demo did not correctly update the style
|
- The editor demo did not correctly update the style
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// "$Id: Fl_Scrollbar.cxx,v 1.7.2.14.2.11 2002/09/04 20:33:18 easysw Exp $"
|
// "$Id: Fl_Scrollbar.cxx,v 1.7.2.14.2.12 2002/09/28 12:04:12 easysw Exp $"
|
||||||
//
|
//
|
||||||
// Scroll bar widget for the Fast Light Tool Kit (FLTK).
|
// Scroll bar widget for the Fast Light Tool Kit (FLTK).
|
||||||
//
|
//
|
||||||
@@ -93,7 +93,8 @@ int Fl_Scrollbar::handle(int event) {
|
|||||||
if (val >= 1.0) sliderx = ww-S;
|
if (val >= 1.0) sliderx = ww-S;
|
||||||
else if (val <= 0.0) sliderx = 0;
|
else if (val <= 0.0) sliderx = 0;
|
||||||
else sliderx = int(val*(ww-S)+.5);
|
else sliderx = int(val*(ww-S)+.5);
|
||||||
if (relx < sliderx) area = 5;
|
if (Fl::event_button() == FL_MIDDLE_MOUSE) area = 8;
|
||||||
|
else if (relx < sliderx) area = 5;
|
||||||
else if (relx >= sliderx+S) area = 6;
|
else if (relx >= sliderx+S) area = 6;
|
||||||
else area = 8;
|
else area = 8;
|
||||||
}
|
}
|
||||||
@@ -248,5 +249,5 @@ Fl_Scrollbar::Fl_Scrollbar(int X, int Y, int W, int H, const char* L)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// End of "$Id: Fl_Scrollbar.cxx,v 1.7.2.14.2.11 2002/09/04 20:33:18 easysw Exp $".
|
// End of "$Id: Fl_Scrollbar.cxx,v 1.7.2.14.2.12 2002/09/28 12:04:12 easysw Exp $".
|
||||||
//
|
//
|
||||||
|
|||||||
Reference in New Issue
Block a user