Setting alignment on non-fixed component.

Size of a component is calculated based on requested size and actual size if it is not fixed.

Close #999.
its better to use two separate `assert.operator` calls than this `assert.isTrue`; the `assert.operator` calls will give a much more helpful error message