mirror of
https://code.videolan.org/videolan/vlc
synced 2024-09-04 09:11:33 +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:
parent
53e51f0414
commit
1f30e8690b
@ -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
|
||||
|
@ -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 );
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user