Fix titlebar layout for small windows