mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-13 09:34:53 +02:00
* Restore last fullscreen state on OSX.
This commit is contained in:
@@ -148,6 +148,12 @@ TomahawkWindow::TomahawkWindow( QWidget* parent )
|
||||
|
||||
vm->setQueue( m_queueView );
|
||||
vm->showWelcomePage();
|
||||
|
||||
if ( TomahawkSettings::instance()->fullscreenEnabled() )
|
||||
{
|
||||
// Window must be fully constructed to toggle fullscreen mode. Queue it up.
|
||||
QTimer::singleShot( 0, this, SLOT( toggleFullscreen() ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -543,6 +549,7 @@ TomahawkWindow::setupSignals()
|
||||
#if defined( Q_OS_MAC )
|
||||
connect( ac->getAction( "minimize" ), SIGNAL( triggered() ), SLOT( minimize() ) );
|
||||
connect( ac->getAction( "zoom" ), SIGNAL( triggered() ), SLOT( maximize() ) );
|
||||
connect( ac->getAction( "fullscreen" ), SIGNAL( triggered() ), SLOT( toggleFullscreen() ) );
|
||||
#else
|
||||
connect( ac->getAction( "toggleMenuBar" ), SIGNAL( triggered() ), SLOT( toggleMenuBar() ) );
|
||||
#endif
|
||||
@@ -875,14 +882,24 @@ TomahawkWindow::showOfflineSources()
|
||||
void
|
||||
TomahawkWindow::fullScreenEntered()
|
||||
{
|
||||
TomahawkSettings::instance()->setFullscreenEnabled( true );
|
||||
statusBar()->setSizeGripEnabled( false );
|
||||
|
||||
#if defined( Q_WS_MAC )
|
||||
ActionCollection::instance()->getAction( "fullscreen" )->setText( tr( "Exit Full Screen" ) );
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
TomahawkWindow::fullScreenExited()
|
||||
{
|
||||
TomahawkSettings::instance()->setFullscreenEnabled( false );
|
||||
statusBar()->setSizeGripEnabled( true );
|
||||
|
||||
#if defined( Q_WS_MAC )
|
||||
ActionCollection::instance()->getAction( "fullscreen" )->setText( tr( "Enter Full Screen" ) );
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -1290,6 +1307,17 @@ TomahawkWindow::maximize()
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
TomahawkWindow::toggleFullscreen()
|
||||
{
|
||||
tDebug() << Q_FUNC_INFO;
|
||||
|
||||
#if defined( Q_WS_MAC )
|
||||
Tomahawk::toggleFullscreen();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
TomahawkWindow::crashNow()
|
||||
{
|
||||
|
@@ -139,6 +139,7 @@ private slots:
|
||||
|
||||
void minimize();
|
||||
void maximize();
|
||||
void toggleFullscreen();
|
||||
|
||||
void playlistCreateDialogFinished( int ret );
|
||||
|
||||
|
Reference in New Issue
Block a user