Commit fa2f997e authored by Olivier Teulière's avatar Olivier Teulière

* skins2: Fixed resizing of the Text control

parent 29a03bfd
......@@ -242,7 +242,7 @@ void CtrlText::displayText( const UString &rText )
m_pImgDouble = m_rFont.drawString( doubleStringWithSep, m_color );
// Update the current image used, as if the control size had changed
onChangePosition();
onPositionChange();
if( m_alignment == kRight && getPosition() &&
getPosition()->getWidth() < m_pImg->getWidth() )
......@@ -281,7 +281,7 @@ void CtrlText::displayText( const UString &rText )
}
void CtrlText::onChangePosition()
void CtrlText::onPositionChange()
{
if( m_pImg && getPosition() )
{
......@@ -303,6 +303,12 @@ void CtrlText::onChangePosition()
}
void CtrlText::onResize()
{
onPositionChange();
}
void CtrlText::CmdToManual::execute()
{
EvtMouse *pEvtMouse = (EvtMouse*)m_pParent->m_pEvt;
......
......@@ -131,7 +131,9 @@ class CtrlText: public CtrlGeneric, public Observer<VarText>
void adjust( int &position );
/// Update the behaviour of the text whenever the control size changes
virtual void onChangePosition();
virtual void onPositionChange();
/// Update the behaviour of the text whenever the control size changes
virtual void onResize();
};
......
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