/////////////////////////////////////////////////////////////////////////////
-// Name: scrolbar.cpp
+// Name: src/gtk/scrolbar.cpp
// Purpose:
// Author: Robert Roebling
// Id: $Id$
// Copyright: (c) 1998 Robert Roebling
-// Licence: wxWindows licence
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#pragma implementation "scrolbar.h"
#endif
-#include "wx/scrolbar.h"
+#include "wx/defs.h"
#if wxUSE_SCROLLBAR
+#include "wx/scrolbar.h"
+
#include "wx/utils.h"
#include <math.h>
else if (range->scroll_type == GTK_SCROLL_PAGE_FORWARD) command = wxEVT_SCROLL_PAGEDOWN;
double dvalue = adjust->value;
- int value = (int)(dvalue >= 0 ? dvalue - 0.5 : dvalue + 0.5);
+ int value = (int)(dvalue < 0 ? dvalue - 0.5 : dvalue + 0.5);
int orient = win->HasFlag(wxSB_VERTICAL) ? wxVERTICAL : wxHORIZONTAL;
int wxScrollBar::GetThumbPosition() const
{
double val = m_adjust->value;
- return (int)(val >= 0 ? val - 0.5 : val + 0.5);
+ return (int)(val < 0 ? val - 0.5 : val + 0.5);
}
int wxScrollBar::GetThumbSize() const