make GetWidgetSize return a const ref instead of a pointer