mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-23 13:31:49 +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
@ -54,13 +54,16 @@ void GuiToc::updateView()
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
widget_->updateView();
|
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);
|
setWindowFlags(Qt::Widget);
|
||||||
setFeatures(DockWidgetClosable);
|
setFeatures(DockWidgetClosable);
|
||||||
// Setting features hides the dialog, see Qt's doc.
|
// Setting features hides the dialog, see Qt's doc.
|
||||||
show();
|
show();
|
||||||
} else if (!(windowFlags() & Qt::Drawer)) {
|
} else if ((features() & DockWidgetClosable) && !lyxview().isFullScreen()) {
|
||||||
setWindowFlags(Qt::Drawer);
|
setWindowFlags(Qt::Drawer);
|
||||||
setFeatures(NoDockWidgetFeatures);
|
setFeatures(NoDockWidgetFeatures);
|
||||||
// Setting features hides the dialog, see Qt's doc.
|
// Setting features hides the dialog, see Qt's doc.
|
||||||
|
Loading…
Reference in New Issue
Block a user