update toggleswitch

- bugfix: setDimensions is not called if the toggleswitch is not a childview
- remove constants