Resize panel height to fit content height
Signed-off-by: Rack Lin <racklin@gmail.com>