Merge "Take margin insets into account when setting position" into sc-dev