// reversed.
int x = _area.x(), y = _area.y();
switch(_gravity) {
+ default:
case NorthWestGravity:
case WestGravity:
case SouthWestGravity:
+ case NorthGravity:
+ case CenterGravity:
+ case SouthGravity:
break;
case NorthEastGravity:
case EastGravity:
if (addborder) x -= _border_width * 2;
else x += _border_width * 2;
break;
+ case ForgetGravity:
+ case StaticGravity:
+ if (addborder) x -= _border_width;
+ else x += _border_width;
+ break;
}
switch(_gravity) {
+ default:
case NorthWestGravity:
+ case WestGravity:
case NorthGravity:
+ case CenterGravity:
case NorthEastGravity:
+ case EastGravity:
break;
case SouthWestGravity:
case SouthGravity:
if (addborder) y -= _border_width * 2;
else y += _border_width * 2;
break;
- default:
- // no change for StaticGravity etc.
+ case ForgetGravity:
+ case StaticGravity:
+ if (addborder) y -= _border_width;
+ else y += _border_width;
break;
}
_area.setPos(x, y);