Commit db7965b7 authored by Olivier Teulière's avatar Olivier Teulière

* skins2: fixed the xkeepratio/ykeepratio attributes for controls not tied to

   the top left corner of the layout
parent 9a707e07
...@@ -1027,6 +1027,21 @@ const Position Builder::makePosition( const string &rLeftTop, ...@@ -1027,6 +1027,21 @@ const Position Builder::makePosition( const string &rLeftTop,
refRightBottom = Position::kRightBottom; refRightBottom = Position::kRightBottom;
} }
// In "keep ratio" mode, overwrite the previously computed values with the
// actual ones
// XXX: this coupling between makePosition and the Position class should
// be reduced...
if( xKeepRatio )
{
left = xPos;
right = xPos + width;
}
if( yKeepRatio )
{
top = yPos;
bottom = yPos + height;
}
return Position( left, top, right, bottom, rBox, refLeftTop, return Position( left, top, right, bottom, rBox, refLeftTop,
refRightBottom, xKeepRatio, yKeepRatio ); refRightBottom, xKeepRatio, yKeepRatio );
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment