Fixed text related calculations for hi-dpi rendering

- calculate all text related stuff using scaling
- removed a couple of compiler warnings
- tweaked caret picking