How do I set the size of my game's 3D viewport

Here’s the situation:

Right now, I have a 3D scene being rendered and a massive widget being rendered on top of it that takes up roughly a third of the screen space. The widget is ALWAYS there so there’s no point in rendering the rest of the scene behind the widget.

I’d like to resize the 3D scene window to the available portion of my widget. It’s hard to phrase this problem so I’ve attached a screenshot.

Thanks!