[vlc-commits] commit: skins2: correct wrong height when animated images are used ( Erwan Tulou )

git at videolan.org git at videolan.org
Tue Jul 20 12:41:08 CEST 2010


vlc | branch: master | Erwan Tulou <erwan10 at videolan.org> | Mon Jul 19 17:09:22 2010 +0200| [409553d22b18aacb2d3a918b900b85643ee6f6f6] | committer: Erwan Tulou 

skins2: correct wrong height when animated images are used

The height of a control associated to an animated image is not the height
of the image but the height divided by the number of subimages.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=409553d22b18aacb2d3a918b900b85643ee6f6f6
---

 modules/gui/skins2/parser/builder.cpp |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/modules/gui/skins2/parser/builder.cpp b/modules/gui/skins2/parser/builder.cpp
index 49925cd..7be91dc 100644
--- a/modules/gui/skins2/parser/builder.cpp
+++ b/modules/gui/skins2/parser/builder.cpp
@@ -456,10 +456,10 @@ void Builder::addButton( const BuilderData::Button &rData )
     const GenericRect *pRect;
     GET_BOX( pRect, rData.m_panelId , pLayout);
     const Position pos = makePosition( rData.m_leftTop, rData.m_rightBottom,
-                                       rData.m_xPos, rData.m_yPos,
-                                       pBmpUp->getWidth(),
-                                       pBmpUp->getHeight(), *pRect,
-                                       rData.m_xKeepRatio, rData.m_yKeepRatio );
+                             rData.m_xPos, rData.m_yPos,
+                             pBmpUp->getWidth(),
+                             pBmpUp->getHeight() / pBmpUp->getNbFrames(),
+                             *pRect, rData.m_xKeepRatio, rData.m_yKeepRatio );
 
     pLayout->addControl( pButton, pos, rData.m_layer );
 }
@@ -533,10 +533,10 @@ void Builder::addCheckbox( const BuilderData::Checkbox &rData )
     const GenericRect *pRect;
     GET_BOX( pRect, rData.m_panelId , pLayout);
     const Position pos = makePosition( rData.m_leftTop, rData.m_rightBottom,
-                                       rData.m_xPos, rData.m_yPos,
-                                       pBmpUp1->getWidth(),
-                                       pBmpUp1->getHeight(), *pRect,
-                                       rData.m_xKeepRatio, rData.m_yKeepRatio );
+                            rData.m_xPos, rData.m_yPos,
+                            pBmpUp1->getWidth(),
+                            pBmpUp1->getHeight() / pBmpUp1->getNbFrames(),
+                            *pRect, rData.m_xKeepRatio, rData.m_yKeepRatio );
 
     pLayout->addControl( pCheckbox, pos, rData.m_layer );
 }



More information about the vlc-commits mailing list