1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-10-04 17:41:42 +02:00

TWK-885: Hide resize handle when in osx full-screen mode

This commit is contained in:
Leo Franchi
2012-05-25 18:08:09 -04:00
parent ac46b080fe
commit f947005666
5 changed files with 57 additions and 15 deletions

View File

@@ -192,7 +192,7 @@ TomahawkWindow::applyPlatformTweaks()
if ( !QString( qApp->style()->metaObject()->className() ).toLower().contains( "qtcurve" ) )
qApp->setStyle( new ProxyStyle() );
#ifdef Q_WS_MAC
#ifdef Q_OS_MAC
setUnifiedTitleAndToolBarOnMac( true );
delete ui->hline1;
delete ui->hline2;
@@ -272,7 +272,7 @@ TomahawkWindow::setupSideBar()
sidebarWidget->layout()->setContentsMargins( 0, 0, 0, 0 );
sidebarWidget->layout()->setMargin( 0 );
#ifndef Q_WS_MAC
#ifndef Q_OS_MAC
sidebarWidget->layout()->setSpacing( 0 );
#endif
@@ -287,11 +287,11 @@ TomahawkWindow::setupSideBar()
void
TomahawkWindow::setupUpdateCheck()
{
#ifndef Q_WS_MAC
#ifndef Q_OS_MAC
ui->menu_Help->insertSeparator( ui->actionAboutTomahawk );
#endif
#if defined( Q_WS_MAC ) && defined( HAVE_SPARKLE )
#if defined( Q_OS_MAC ) && defined( HAVE_SPARKLE )
QAction* checkForUpdates = ui->menu_Help->addAction( tr( "Check For Updates..." ) );
checkForUpdates->setMenuRole( QAction::ApplicationSpecificRole );
connect( checkForUpdates, SIGNAL( triggered( bool ) ), SLOT( checkForUpdates() ) );
@@ -350,7 +350,7 @@ TomahawkWindow::setupSignals()
connect( ui->actionNext, SIGNAL( triggered() ), AudioEngine::instance(), SLOT( next() ) );
connect( ui->actionPrevious, SIGNAL( triggered() ), AudioEngine::instance(), SLOT( previous() ) );
#if defined( Q_WS_MAC )
#if defined( Q_OS_MAC )
connect( ui->actionMinimize, SIGNAL( triggered() ), SLOT( minimize() ) );
connect( ui->actionZoom, SIGNAL( triggered() ), SLOT( maximize() ) );
#else
@@ -399,7 +399,7 @@ TomahawkWindow::changeEvent( QEvent* e )
void
TomahawkWindow::closeEvent( QCloseEvent* e )
{
#ifndef Q_WS_MAC
#ifndef Q_OS_MAC
if ( e->spontaneous() && QSystemTrayIcon::isSystemTrayAvailable() )
{
hide();
@@ -419,7 +419,7 @@ TomahawkWindow::showEvent( QShowEvent* e )
{
QMainWindow::showEvent( e );
#if defined( Q_WS_MAC )
#if defined( Q_OS_MAC )
ui->actionMinimize->setDisabled( false );
ui->actionZoom->setDisabled( false );
#endif
@@ -431,7 +431,7 @@ TomahawkWindow::hideEvent( QHideEvent* e )
{
QMainWindow::hideEvent( e );
#if defined( Q_WS_MAC )
#if defined( Q_OS_MAC )
ui->actionMinimize->setDisabled( true );
ui->actionZoom->setDisabled( true );
#endif
@@ -442,7 +442,7 @@ void
TomahawkWindow::keyPressEvent( QKeyEvent* e )
{
bool accept = true;
#if ! defined ( Q_WS_MAC )
#if ! defined ( Q_OS_MAC )
#define KEY_PRESSED Q_FUNC_INFO << "Multimedia Key Pressed:"
switch( e->key() )
{
@@ -590,11 +590,25 @@ TomahawkWindow::showOfflineSources()
}
void
TomahawkWindow::fullScreenEntered()
{
statusBar()->setSizeGripEnabled( false );
}
void
TomahawkWindow::fullScreenExited()
{
statusBar()->setSizeGripEnabled( true );
}
void
TomahawkWindow::loadSpiff()
{
LoadXSPFDialog* diag = new LoadXSPFDialog( this, Qt::Sheet );
#ifdef Q_WS_MAC
#ifdef Q_OS_MAC
connect( diag, SIGNAL( finished( int ) ), this, SLOT( loadXspfFinished( int ) ) );
diag->show();
#else
@@ -719,7 +733,7 @@ void
TomahawkWindow::createPlaylist()
{
PlaylistTypeSelectorDlg* playlistSelectorDlg = new PlaylistTypeSelectorDlg( TomahawkApp::instance()->mainWindow(), Qt::Sheet );
#ifndef Q_WS_MAC
#ifndef Q_OS_MAC
playlistSelectorDlg->setModal( true );
#endif
connect( playlistSelectorDlg, SIGNAL( finished( int ) ), this, SLOT( playlistCreateDialogFinished( int ) ) );
@@ -863,7 +877,7 @@ TomahawkWindow::showAboutTomahawk()
void
TomahawkWindow::checkForUpdates()
{
#ifdef Q_WS_MAC
#ifdef Q_OS_MAC
Tomahawk::checkForUpdates();
#endif
}