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 )
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 );
pBmpUp->getHeight() / pBmpUp->getNbFrames(),
*pRect, rData.m_xKeepRatio, rData.m_yKeepRatio );
pLayout->addControl( pButton, pos, rData.m_layer );
}
......@@ -535,8 +535,8 @@ void Builder::addCheckbox( const BuilderData::Checkbox &rData )
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 );
pBmpUp1->getHeight() / pBmpUp1->getNbFrames(),
*pRect, rData.m_xKeepRatio, rData.m_yKeepRatio );
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