comctl32/trackbar: Fix mouse position to thumb position conversion rounding.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
cd55d74742
commit
6a237bdb60
@ -34,6 +34,7 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <math.h>
|
||||||
|
|
||||||
#include "windef.h"
|
#include "windef.h"
|
||||||
#include "winbase.h"
|
#include "winbase.h"
|
||||||
@ -203,7 +204,7 @@ TRACKBAR_ConvertPlaceToPosition (const TRACKBAR_INFO *infoPtr, int place)
|
|||||||
pos = infoPtr->lRangeMin;
|
pos = infoPtr->lRangeMin;
|
||||||
|
|
||||||
TRACE("%.2f\n", pos);
|
TRACE("%.2f\n", pos);
|
||||||
return (LONG)(pos + 0.5);
|
return (LONG)floor(pos + 0.5);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user