use screen width to calculate preview size

@jancborchardt @georgehrke @PVince81 @karlitschek