Bug581108: Palette and toolbox should be flexible and take up available horizontal spac

Modifications to allow horizontal and compressed layouts of the tool and color palettes.