correctly handle devicepixelratio
some layout settings changeable