]> git.sesse.net Git - vlc/blobdiff - modules/gui/skins2/parser/builder.cpp
* skins2: Text control now accepts lefttop and rightbottom attributes, like
[vlc] / modules / gui / skins2 / parser / builder.cpp
index bc4996a83032b6518eebed09ecb12883d0f71775..ba1331af8aee6493c7486571f7e71e2c5c36c3e8 100644 (file)
@@ -453,10 +453,13 @@ void Builder::addText( const BuilderData::Text &rData )
 
     int height = pFont->getSize();
 
-    pLayout->addControl( pText, Position( rData.m_xPos, rData.m_yPos,
-                                          rData.m_xPos + rData.m_width,
-                                          rData.m_yPos + height, *pLayout ),
-                         rData.m_layer );
+    // Compute the position of the control
+    const Position pos = makePosition( rData.m_leftTop, rData.m_rightBottom,
+                                       rData.m_xPos, rData.m_yPos,
+                                       rData.m_width, height,
+                                       *pLayout );
+
+    pLayout->addControl( pText, pos, rData.m_layer );
 
     m_pTheme->m_controls[rData.m_id] = CtrlGenericPtr( pText );
 }