Skip to content
Snippets Groups Projects
Commit f27a9160 authored by Morten Johan Sorvig's avatar Morten Johan Sorvig Committed by Eike Ziller
Browse files

Enable Lion-style fullscreen mode for Creator.


Change-Id: Ib44cdd432da7b4609026e211d8c43088d883621a
Reviewed-by: default avatarEike Ziller <eike.ziller@nokia.com>
parent ee6c693a
No related branches found
No related tags found
No related merge requests found
......@@ -213,7 +213,9 @@ win32 {
LIBS += -lole32
}
else:macx {
OBJECTIVE_SOURCES += progressmanager/progressmanager_mac.mm
OBJECTIVE_SOURCES += progressmanager/progressmanager_mac.mm \
fullscreen.mm
LIBS += -framework AppKit
}
else:unix {
......
/**************************************************************************
**
** This file is part of Qt Creator
**
** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
**
** Contact: Nokia Corporation (info@qt.nokia.com)
**
**
** GNU Lesser General Public License Usage
**
** This file may be used under the terms of the GNU Lesser General Public
** License version 2.1 as published by the Free Software Foundation and
** appearing in the file LICENSE.LGPL included in the packaging of this file.
** Please review the following information to ensure the GNU Lesser General
** Public License version 2.1 requirements will be met:
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Nokia gives you certain additional
** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** Other Usage
**
** Alternatively, this file may be used in accordance with the terms and
** conditions contained in a signed written agreement between you and Nokia.
**
** If you have questions regarding the use of this file, please contact
** Nokia at info@qt.nokia.com.
**
**************************************************************************/
#import <Cocoa/Cocoa.h>
#include <QWidget>
void enableMacFullScreen(WId winId)
{
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7
if (QSysInfo::MacintoshVersion >= QSysInfo::MV_10_7) {
NSView *nsview = reinterpret_cast<NSView *>(winId);
NSWindow *nswindow = [nsview window];
[nswindow setCollectionBehavior:NSWindowCollectionBehaviorFullScreenPrimary];
}
#endif
}
......@@ -226,6 +226,11 @@ MainWindow::MainWindow() :
//signal(SIGINT, handleSigInt);
#endif
#ifdef Q_WS_MAC
extern void enableMacFullScreen(WId);
enableMacFullScreen(winId());
#endif
statusBar()->setProperty("p_styled", true);
setAcceptDrops(true);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment