Settings: calculate sidebar width dynamically

Fixes #1020