* fix fullscreen TOC switching between dock and drawer mode on Mac

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27063 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Stefan Schimanski 2008-10-23 20:46:03 +00:00
parent 62530e98e0
commit df79293cc1

View File

@ -49,18 +49,21 @@ GuiToc::~GuiToc()
void GuiToc::updateView()
{
#ifndef Q_WS_MACX
widget_->updateView();
return;
widget_->updateView();
return;
#endif
widget_->updateView();
// Special code for Mac drawer.
if (windowFlags() & Qt::Drawer && lyxview().isFullScreen()) {
// For Mac: switch to a docked TOC in fullscreen mode.
// We use the features() here instead of WindowFlags because
// the latter are not reliable (always returns Qt::Drawer).
if (!(features() & DockWidgetClosable) && lyxview().isFullScreen()) {
setWindowFlags(Qt::Widget);
setFeatures(DockWidgetClosable);
// Setting features hides the dialog, see Qt's doc.
show();
} else if (!(windowFlags() & Qt::Drawer)) {
} else if ((features() & DockWidgetClosable) && !lyxview().isFullScreen()) {
setWindowFlags(Qt::Drawer);
setFeatures(NoDockWidgetFeatures);
// Setting features hides the dialog, see Qt's doc.