Commit 409553d2 authored by Erwan Tulou's avatar 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.
parent 182e6458
...@@ -456,10 +456,10 @@ void Builder::addButton( const BuilderData::Button &rData ) ...@@ -456,10 +456,10 @@ void Builder::addButton( const BuilderData::Button &rData )
const GenericRect *pRect; const GenericRect *pRect;
GET_BOX( pRect, rData.m_panelId , pLayout); GET_BOX( pRect, rData.m_panelId , pLayout);
const Position pos = makePosition( rData.m_leftTop, rData.m_rightBottom, const Position pos = makePosition( rData.m_leftTop, rData.m_rightBottom,
rData.m_xPos, rData.m_yPos, rData.m_xPos, rData.m_yPos,
pBmpUp->getWidth(), pBmpUp->getWidth(),
pBmpUp->getHeight(), *pRect, pBmpUp->getHeight() / pBmpUp->getNbFrames(),
rData.m_xKeepRatio, rData.m_yKeepRatio ); *pRect, rData.m_xKeepRatio, rData.m_yKeepRatio );
pLayout->addControl( pButton, pos, rData.m_layer ); pLayout->addControl( pButton, pos, rData.m_layer );
} }
...@@ -533,10 +533,10 @@ void Builder::addCheckbox( const BuilderData::Checkbox &rData ) ...@@ -533,10 +533,10 @@ void Builder::addCheckbox( const BuilderData::Checkbox &rData )
const GenericRect *pRect; const GenericRect *pRect;
GET_BOX( pRect, rData.m_panelId , pLayout); GET_BOX( pRect, rData.m_panelId , pLayout);
const Position pos = makePosition( rData.m_leftTop, rData.m_rightBottom, const Position pos = makePosition( rData.m_leftTop, rData.m_rightBottom,
rData.m_xPos, rData.m_yPos, rData.m_xPos, rData.m_yPos,
pBmpUp1->getWidth(), pBmpUp1->getWidth(),
pBmpUp1->getHeight(), *pRect, pBmpUp1->getHeight() / pBmpUp1->getNbFrames(),
rData.m_xKeepRatio, rData.m_yKeepRatio ); *pRect, rData.m_xKeepRatio, rData.m_yKeepRatio );
pLayout->addControl( pCheckbox, pos, rData.m_layer ); pLayout->addControl( pCheckbox, pos, rData.m_layer );
} }
......
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