#300: rotation fix

Work in progress: not too happy with the result since it changes a lot of panels code, but it works