Change position calculation

- Make it more platform independant
Fix slider repaint on enabled value change