projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
typo fix
[wxWidgets.git]
/
src
/
gtk1
/
slider.cpp
diff --git
a/src/gtk1/slider.cpp
b/src/gtk1/slider.cpp
index 6f37e772225bb8e75b9367fb4c3fb8f80a8fd057..e0070f21ed38f7a280308e16f4b28fbcf44556c5 100644
(file)
--- a/
src/gtk1/slider.cpp
+++ b/
src/gtk1/slider.cpp
@@
-16,9
+16,9
@@
#ifndef WX_PRECOMP
#include "wx/utils.h"
#ifndef WX_PRECOMP
#include "wx/utils.h"
+ #include "wx/math.h"
#endif
#endif
-#include "wx/math.h"
#include "wx/gtk1/private.h"
//-----------------------------------------------------------------------------
#include "wx/gtk1/private.h"
//-----------------------------------------------------------------------------
@@
-44,13
+44,6
@@
static inline bool AreSameAdjustValues(double x, double y)
return fabs(x - y) < 0.02;
}
return fabs(x - y) < 0.02;
}
-static inline int AdjustValueToInt(double x)
-{
- // we want to round to the nearest integer, i.e. 0.9 is rounded to 1 and
- // -0.9 is rounded to -1
- return (int)(x < 0 ? x - 0.5 : x + 0.5);
-}
-
// process a scroll event
static void
ProcessScrollEvent(wxSlider *win, wxEventType evtType, double dvalue)
// process a scroll event
static void
ProcessScrollEvent(wxSlider *win, wxEventType evtType, double dvalue)
@@
-209,7
+202,7
@@
bool wxSlider::Create(wxWindow *parent, wxWindowID id,
int wxSlider::GetValue() const
{
int wxSlider::GetValue() const
{
- return
AdjustValueToInt
(m_adjust->value);
+ return
wxRound
(m_adjust->value);
}
void wxSlider::SetValue( int value )
}
void wxSlider::SetValue( int value )