Change warn panel to adjust its size according to its message's length.

Also added maximum height to prevent panel growing too large in case of very long warning message