Use Qt namespace to simplify Ruler::paintEvent
Stopped ruler values colliding at high zoom
Added a margin around ruler values
Improved painting of cursor values