Toolbar adjust to content

Toolbar adjust to content makes the size not correct.

This:

results in this:
image