]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk1/slider.cpp
Added wxCURSOR_ARROWWAIT which is the default arrow+hourglass cursor
[wxWidgets.git] / src / gtk1 / slider.cpp
index 58aa39db8193429e5844070da999d97ba0226394..6ad996cbfc91828558d9881f03e824d3973f1014 100644 (file)
@@ -61,7 +61,8 @@ static void gtk_slider_callback( GtkAdjustment *adjust, wxSlider *win )
     else if (range->scroll_type == GTK_SCROLL_PAGE_BACKWARD) command = wxEVT_SCROLL_PAGEUP;
     else if (range->scroll_type == GTK_SCROLL_PAGE_FORWARD)  command = wxEVT_SCROLL_PAGEDOWN;
 
-    int value = (int)ceil(adjust->value);
+    double dvalue = adjust->value;
+    int value = (int)(dvalue >= 0 ? dvalue - 0.5 : dvalue + 0.5);
 
     int orient = wxHORIZONTAL;
     if ( (win->GetWindowStyleFlag() & wxSB_VERTICAL) == wxSB_VERTICAL)