mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-07 12:32:26 +00:00
save/restore toolbars state when toggling fullscreen mode.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24955 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
7bb8a5f183
commit
1c7f411c10
@ -22,7 +22,6 @@
|
||||
#include "GuiWorkArea.h"
|
||||
#include "GuiKeySymbol.h"
|
||||
#include "GuiToolbar.h"
|
||||
#include "GuiToolbars.h"
|
||||
#include "Menus.h"
|
||||
#include "TocModel.h"
|
||||
|
||||
@ -1986,12 +1985,8 @@ void GuiView::lfunUiToggle(FuncRequest const & cmd)
|
||||
return;
|
||||
}
|
||||
|
||||
if (lyxrc.full_screen_toolbars) {
|
||||
ToolbarMap::iterator end = d.toolbars_.end();
|
||||
for (ToolbarMap::iterator it = d.toolbars_.begin(); it != end; ++it)
|
||||
; //it->second->toggleFullScreen(!isFullScreen());
|
||||
}
|
||||
// d.toolbars_->toggleFullScreen(!isFullScreen());
|
||||
QSettings settings;
|
||||
QString const key = "view-" + QString::number(id_);
|
||||
|
||||
if (isFullScreen()) {
|
||||
for (int i = 0; i != d.splitter_->count(); ++i)
|
||||
@ -2002,6 +1997,10 @@ void GuiView::lfunUiToggle(FuncRequest const & cmd)
|
||||
setWindowState(windowState() ^ Qt::WindowFullScreen);
|
||||
menuBar()->show();
|
||||
statusBar()->show();
|
||||
if (lyxrc.full_screen_toolbars) {
|
||||
if (!restoreState(settings.value(key + "/layout").toByteArray(), 0))
|
||||
initToolbars();
|
||||
}
|
||||
} else {
|
||||
for (int i = 0; i != d.splitter_->count(); ++i)
|
||||
d.tabWorkArea(i)->setFullScreen(true);
|
||||
@ -2011,6 +2010,12 @@ void GuiView::lfunUiToggle(FuncRequest const & cmd)
|
||||
setWindowState(windowState() ^ Qt::WindowFullScreen);
|
||||
statusBar()->hide();
|
||||
menuBar()->hide();
|
||||
if (lyxrc.full_screen_toolbars) {
|
||||
settings.setValue(key + "/layout", saveState(0));
|
||||
ToolbarMap::iterator end = d.toolbars_.end();
|
||||
for (ToolbarMap::iterator it = d.toolbars_.begin(); it != end; ++it)
|
||||
it->second->hide();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user