Clean up maximized headerbar code a bit
The new maximized headerbar layout works great, but suffered from a few papercut visual bugs, and the logic to implement it was unnecessarily complicated in some cases. This patch simplifies the logic as much as possible and fixes the layout bugs in the process.
Edited by Nate Graham