* \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
#include <QTimer>
#include <QToolBar>
#include <QUrl>
+#include <QScrollBar>
#include <boost/assert.hpp>
#include <boost/bind.hpp>
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;