]> git.sesse.net Git - vlc/commitdiff
skins2: resize new layout first when switching between layouts.
authorJean-Paul Saman <jean-paul.saman@m2x.nl>
Mon, 12 Mar 2012 13:54:06 +0000 (14:54 +0100)
committerJean-Paul Saman <jean-paul.saman@m2x.nl>
Mon, 12 Mar 2012 14:43:02 +0000 (15:43 +0100)
When switching layouts the windows was resized to the default state at design time.
Now the layout being switched to is first resized to the size of the current layout.
Switching layouts now nolonger results in the layout being restored to its default size,
instead it keeps the size the user inteded it to have.

modules/gui/skins2/src/top_window.cpp

index 8e9973021a9a0b5a5c27a9faee175cdb466d1998..2579c2e9cd1e382d91d47fe788cc155336048b47 100644 (file)
@@ -358,6 +358,7 @@ void TopWindow::setActiveLayout( GenericLayout *pLayout )
         }
         // The current layout becomes inactive
         m_pActiveLayout->getActiveVar().set( false );
+        pLayout->resize( m_pActiveLayout->getWidth(), m_pActiveLayout->getHeight() );
     }
 
     pLayout->setWindow( this );