From bd808b064d8a54e9c1003bf36f5e03d8d725a36b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C3=ABl=20Carr=C3=A9?= Date: Sun, 20 Jan 2008 21:26:07 +0000 Subject: [PATCH] qt4: add the hability to put the *interface* in fullscreen (hotkey: F11) --- modules/gui/qt4/main_interface.cpp | 8 ++++++++ modules/gui/qt4/main_interface.hpp | 1 + modules/gui/qt4/menus.cpp | 4 ++++ 3 files changed, 13 insertions(+) diff --git a/modules/gui/qt4/main_interface.cpp b/modules/gui/qt4/main_interface.cpp index 0c8022d086..3c5943fc7d 100644 --- a/modules/gui/qt4/main_interface.cpp +++ b/modules/gui/qt4/main_interface.cpp @@ -1135,6 +1135,14 @@ void MainInterface::closeEvent( QCloseEvent *e ) THEDP->quit(); } +void MainInterface::toggleFullScreen( void ) +{ + if( isFullScreen() ) + showNormal(); + else + showFullScreen(); +} + /***************************************************************************** * Callbacks *****************************************************************************/ diff --git a/modules/gui/qt4/main_interface.hpp b/modules/gui/qt4/main_interface.hpp index 85911e1ec8..4253fb7b5f 100644 --- a/modules/gui/qt4/main_interface.hpp +++ b/modules/gui/qt4/main_interface.hpp @@ -143,6 +143,7 @@ public slots: void togglePlaylist(); void toggleUpdateSystrayMenu(); void toggleAdvanced(); + void toggleFullScreen(); /* Manage the Video Functions from the vout threads */ void releaseVideoSlot( void * ); diff --git a/modules/gui/qt4/menus.cpp b/modules/gui/qt4/menus.cpp index 1857c91214..14e05bcd81 100644 --- a/modules/gui/qt4/menus.cpp +++ b/modules/gui/qt4/menus.cpp @@ -274,6 +274,10 @@ QMenu *QVLCMenu::ToolsMenu( intf_thread_t *p_intf, if( mi->getControlsVisibilityStatus() & CONTROLS_VISIBLE ) action->setChecked( true ); + /* FullScreen View */ + action = menu->addAction( qtr( "Toggle Fullscreen Interface" ), mi, + SLOT( toggleFullScreen() ), qtr( "F11" ) ); + /* Advanced Controls */ action = menu->addAction( qtr( "Advanced controls" ), mi, SLOT( toggleAdvanced() ) ); -- GitLab