1
mirror of https://code.videolan.org/videolan/vlc synced 2024-07-21 07:24:15 +02:00

skins2: fix #689 (text control refresh issue)

This patch redefines the method associated with visibility
to ensure that the latest text is displayed when
the text control gets visible
This commit is contained in:
Erwan Tulou 2010-02-23 22:56:03 +01:00
parent 53e51f0414
commit 1f30e8690b
2 changed files with 20 additions and 0 deletions

View File

@ -211,6 +211,23 @@ void CtrlText::onUpdate( Subject<VarText> &rVariable, void* arg )
}
void CtrlText::onUpdate( Subject<VarBool> &rVariable, void *arg )
{
// Visibility changed
if( &rVariable == m_pVisible )
{
if( isVisible() )
{
displayText( m_rVariable.get() );
}
else
{
notifyLayout();
}
}
}
void CtrlText::displayText( const UString &rText )
{
// Create the images ('normal' and 'double') from the text

View File

@ -124,6 +124,9 @@ private:
/// Method called when the observed variable is modified
virtual void onUpdate( Subject<VarText> &rVariable, void* );
/// Method called when visibility is updated
virtual void onUpdate( Subject<VarBool> &rVariable , void* );
/// Display the text on the control
void displayText( const UString &rText );