Adding Qt 5.1.0 compatibility
Add margin for pen stroke width