Using DPI corresponding to each device instead of hardcoded variables.