]> git.sesse.net Git - vlc/commitdiff
* skins2: fixed the xkeepratio/ykeepratio attributes for controls not tied to
authorOlivier Teulière <ipkiss@videolan.org>
Sun, 6 Aug 2006 15:49:56 +0000 (15:49 +0000)
committerOlivier Teulière <ipkiss@videolan.org>
Sun, 6 Aug 2006 15:49:56 +0000 (15:49 +0000)
   the top left corner of the layout

modules/gui/skins2/parser/builder.cpp

index 569010e4d8e8358fd2facd5198bf52eecc34bc4f..f35f844992d17269b9649d532903308a210e5388 100644 (file)
@@ -1027,6 +1027,21 @@ const Position Builder::makePosition( const string &rLeftTop,
         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,
                      refRightBottom, xKeepRatio, yKeepRatio );
 }