<right> and <bottom> should measure from the right and bottom respectively
authorJonathan Marshall <jmarshall@xbmc.org>
Sun, 17 Nov 2013 22:09:04 +0000 (11:09 +1300)
committerJonathan Marshall <jmarshall@xbmc.org>
Tue, 3 Dec 2013 19:51:48 +0000 (08:51 +1300)
xbmc/guilib/GUIControlFactory.cpp

index 7cd638c..9f562f6 100644 (file)
@@ -224,7 +224,12 @@ bool CGUIControlFactory::GetDimensions(const TiXmlNode *node, const char *leftTa
   // read from the XML
   bool hasLeft = GetPosition(node, leftTag, parentSize, left);
   bool hasCenter = GetPosition(node, centerTag, parentSize, center);
-  bool hasRight = GetPosition(node, rightTag, parentSize, right);
+  bool hasRight = false;
+  if (GetPosition(node, rightTag, parentSize, right))
+  {
+    right = parentSize - right;
+    hasRight = true;
+  }
   bool hasWidth = GetDimension(node, widthTag, parentSize, width, min_width);
 
   if (!hasLeft)