mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-23 05:25:26 +00:00
* 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:
parent
62530e98e0
commit
df79293cc1
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user