Fixes #2509. Widget alignment when displaying instance code