git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@9789
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
else if (range->scroll_type == GTK_SCROLL_PAGE_FORWARD) command = wxEVT_SCROLL_PAGEDOWN;
double dvalue = adjust->value;
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 orient = win->HasFlag(wxSB_VERTICAL) ? wxVERTICAL : wxHORIZONTAL;
int wxScrollBar::GetThumbPosition() const
{
double val = m_adjust->value;
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
}
int wxScrollBar::GetThumbSize() const
else if (range->scroll_type == GTK_SCROLL_PAGE_FORWARD) command = wxEVT_SCROLL_PAGEDOWN;
double dvalue = adjust->value;
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 orient = win->HasFlag(wxSB_VERTICAL) ? wxVERTICAL : wxHORIZONTAL;
int wxScrollBar::GetThumbPosition() const
{
double val = m_adjust->value;
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
}
int wxScrollBar::GetThumbSize() const