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
...@@ -458,8 +458,8 @@ void Builder::addButton( const BuilderData::Button &rData ) ...@@ -458,8 +458,8 @@ void Builder::addButton( const BuilderData::Button &rData )
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 );
} }
...@@ -535,8 +535,8 @@ void Builder::addCheckbox( const BuilderData::Checkbox &rData ) ...@@ -535,8 +535,8 @@ void Builder::addCheckbox( const BuilderData::Checkbox &rData )
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