/* Final sizing and showing */
setVisible( !b_hideAfterCreation );
- setMinimumWidth( __MAX( controls->sizeHint().width(),
- menuBar()->sizeHint().width() ) + 30 );
+ computeMinimumSize();
/* Switch to minimal view if needed, must be called after the show() */
if( b_minimalView )
p_intf->p_sys->p_mi = NULL;
}
+void MainInterface::computeMinimumSize()
+{
+ int minWidth = 30;
+ if( menuBar()->isVisible() )
+ minWidth += __MAX( controls->sizeHint().width(), menuBar()->sizeHint().width() );
+
+ setMinimumWidth( minWidth );
+}
+
/*****************************
* Main UI handling *
*****************************/
playlistVisible = true;
}
+/*
+ * setMinimalView is the private function used by
+ * the SLOT toggleMinimalView and setVideoFullScreen
+ */
void MainInterface::setMinimalView( bool b_minimal )
{
menuBar()->setVisible( !b_minimal );
}
/*
- If b_minimal is false, then we are normalView
+ * This public SLOT is used for moving to minimal View Mode
+ *
+ * If b_minimal is false, then we are normalView
*/
void MainInterface::toggleMinimalView( bool b_minimal )
{
}
b_minimalView = b_minimal;
if( !b_videoFullScreen )
+ {
setMinimalView( b_minimalView );
+ computeMinimumSize();
+ }
emit minimalViewToggled( b_minimalView );
}
{
if( url.isValid() )
{
- char* psz_uri = make_URI( qtu( url.toString() ), NULL );
+ char* psz_uri = make_URI( url.toEncoded().constData(), NULL );
playlist_Add( THEPL, psz_uri, NULL,
PLAYLIST_APPEND | (first ? PLAYLIST_GO: PLAYLIST_PREPARSE),
PLAYLIST_END, true, pl_Unlocked );