]> git.sesse.net Git - vlc/commitdiff
* skins2: Fixed resizing of the Text control
authorOlivier Teulière <ipkiss@videolan.org>
Sun, 6 Aug 2006 16:36:30 +0000 (16:36 +0000)
committerOlivier Teulière <ipkiss@videolan.org>
Sun, 6 Aug 2006 16:36:30 +0000 (16:36 +0000)
modules/gui/skins2/controls/ctrl_text.cpp
modules/gui/skins2/controls/ctrl_text.hpp

index 4641c851616833f49d1f181c9a1a52785a658de9..df0e86508a33499257183feb3326c59fca6a2497 100644 (file)
@@ -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;
index 45b75cd6fb2cd0638425f8cea8eec152e84a038c..30695f4e25e281438249028a8f6655718b42db91 100644 (file)
@@ -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();
 };