The original Soui layout uses the Pos2type property to define the offset of the POS with only 2 values, mainly for the offset of the window position when the window size needs to be dynamically computed (such as horizontal, vertical centering, etc.).
Pos2type can define 9 reference points: Center, Lefttop, Leftmid, Leftbottom,midtop,midbottom,righttop,rightmid,rightbottom.
The new version of the Offset property can define the offset in X, y two directions: offset = "Xoctave,yoctave", Xoctave, Yoctave represents a multiple of the offset window size in the x, y direction, typically [ -1,0] for a decimal (float), Of course it can be over this range.
The following table shows the offset property of the corresponding original Pos2type property:
Pos2type |
Offset |
Center |
-0.5,-0.5 |
Lefttop |
0,0 |
Leftmid |
0,-0.5 |
Leftbottom |
0,-1 |
Midtop |
-0.5,0 |
Midbottom |
-0.5,-1 |
Righttop |
-1,0 |
Rightmid |
-1,-0.5 |
Rightbottom |
-1,-1 |
As can be seen from the above table, the original Pos2type property can only be a multiple of 0.5, the new offset property does not have this limit.
And the original Pos2type property is valid only if the POS attribute contains only two values, and the new offset property is valid regardless of whether the POS attribute has a value.
Of course the update may bring some work synchronized with the new version, and if the product has been developed it is not recommended to upgrade.
2014.11.20 soui Important update: Swindow layout Properties Pos2type replaced by offset.