calculate square dimensions in dp instead of px