Special background for groupboxes, menus, etc is now handled directly in the painting routine rather than adjusting
the palette. This was indeed breaking palette inheritance, and requiring hacks that apparently posed some performance
regressions.
- check documentMode to decide tab background color.
BUG: 356561
BUG: 356343