mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 05:16:21 +00:00
ui-toggle lfun tweaks.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22950 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
9600fb1aaf
commit
a05f041470
@ -1109,6 +1109,7 @@ void LyXAction::init()
|
||||
* \li Syntax: ui-toggle <statusbar|menubar|frame|fullscreen>
|
||||
* \li Params: statusbar : Toggle visibility of the statusbar.\n
|
||||
menubar : Toggle visibility of the menubar.\n
|
||||
scrollbar : Toggle visibility of the scrollbar.\n
|
||||
frame : Toggle visibility of the frames around editing window.\n
|
||||
fullscreen : Toggle fullscreen mode. This also covers calling the
|
||||
previous functions. However #LFUN_TOOLBAR_TOGGLE for the
|
||||
|
@ -84,6 +84,7 @@
|
||||
#include <QTimer>
|
||||
#include <QToolBar>
|
||||
#include <QUrl>
|
||||
#include <QScrollBar>
|
||||
|
||||
#include <boost/assert.hpp>
|
||||
#include <boost/bind.hpp>
|
||||
@ -1815,6 +1816,18 @@ bool GuiView::dispatch(FuncRequest const & cmd)
|
||||
void GuiView::lfunUiToggle(FuncRequest const & cmd)
|
||||
{
|
||||
string const arg = cmd.getArg(0);
|
||||
if (arg == "scrollbar") {
|
||||
// hide() is of no help
|
||||
if (d.current_work_area_->verticalScrollBarPolicy() ==
|
||||
Qt::ScrollBarAlwaysOff)
|
||||
|
||||
d.current_work_area_->setVerticalScrollBarPolicy(
|
||||
Qt::ScrollBarAsNeeded);
|
||||
else
|
||||
d.current_work_area_->setVerticalScrollBarPolicy(
|
||||
Qt::ScrollBarAlwaysOff);
|
||||
return;
|
||||
}
|
||||
if (arg == "statusbar") {
|
||||
statusBar()->setVisible(!statusBar()->isVisible());
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user