Commit 1ced7291 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt4 - switch to minimal view should hide and show the menu, now. Close Trax#26

parent 651671b0
......@@ -194,7 +194,7 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
createSystray();
if( config_GetInt( p_intf, "qt-minimal-view" ) )
toggleMenus();
toggleMinimalView();
/* Init input manager */
MainInputManager::getInstance( p_intf );
......@@ -621,8 +621,9 @@ void MainInterface::visual()
}
#endif
void MainInterface::toggleMenus()
void MainInterface::toggleMinimalView()
{
TOGGLEV( menuBar() );
TOGGLEV( controls );
TOGGLEV( statusBar() );
updateGeometry();
......@@ -916,6 +917,13 @@ void MainInterface::customEvent( QEvent *event )
void MainInterface::keyPressEvent( QKeyEvent *e )
{
if( ( e->modifiers() & Qt::ControlModifier ) && ( e->key() & Qt::Key_H )
&& menuBar()->isHidden() )
{
toggleMinimalView();
e->accept();
}
int i_vlck = qtEventToVLCKey( e );
if( i_vlck >= 0 )
{
......
......@@ -131,7 +131,7 @@ private:
void customEvent( QEvent *);
public slots:
void undockPlaylist();
void toggleMenus();
void toggleMinimalView();
void togglePlaylist();
void toggleUpdateSystrayMenu();
void toggleAdvanced();
......
......@@ -257,7 +257,8 @@ QMenu *QVLCMenu::ToolsMenu( intf_thread_t *p_intf, MainInterface *mi,
{
/* Minimal View */
QAction *action=menu->addAction( qtr( "Minimal View..." ), mi,
SLOT( toggleMenus() ), qtr( "Ctrl+H" ) );
SLOT( toggleMinimalView() ), qtr( "Ctrl+H" ) );
//FIXME: remove useless thing. But keep it until the release, pls.
action->setCheckable( true );
if( mi->getControlsVisibilityStatus() & CONTROLS_VISIBLE )
action->setChecked( true );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment