adjust frame width and height.