replaced `width` and `height` with a single attribute `size`

Signed-off-by: Gerald <gera2ld@163.com>