Introduce GuiWorkArea::setFullScreen()

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22902 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Abdelrazak Younes 2008-02-09 18:03:53 +00:00
parent 1ff60667a6
commit b409db5d1c
3 changed files with 12 additions and 5 deletions

View File

@ -1839,7 +1839,7 @@ void GuiView::lfunUiToggle(FuncRequest const & cmd)
} }
#endif #endif
if (arg != "fullscreen") { if (arg != "fullscreen") {
message(bformat(_("LFUN_UI_TOGGLE %1$s unknown command!"), arg)); message(bformat(_("LFUN_UI_TOGGLE %1$s unknown command!"), from_utf8(arg)));
return; return;
} }
@ -1850,8 +1850,7 @@ void GuiView::lfunUiToggle(FuncRequest const & cmd)
#endif #endif
// FIXME: it is not enough to take care of the current work area. // FIXME: it is not enough to take care of the current work area.
// All work areas are affected by a full screen mode! // All work areas are affected by a full screen mode!
d.current_work_area_->setFrameStyle(QFrame::NoFrame); d.current_work_area_->setFullScreen(false);
d.current_work_area_->bufferView().setFullScreen(false);
menuBar()->show(); menuBar()->show();
statusBar()->show(); statusBar()->show();
} else { } else {
@ -1859,8 +1858,7 @@ void GuiView::lfunUiToggle(FuncRequest const & cmd)
menuBar()->hide(); menuBar()->hide();
// FIXME: it is not enough to take care of the current work area. // FIXME: it is not enough to take care of the current work area.
// All work areas are affected by a full screen mode! // All work areas are affected by a full screen mode!
d.current_work_area_->setFrameStyle(QFrame::NoFrame); d.current_work_area_->setFullScreen(true);
d.current_work_area_->bufferView().setFullScreen(true);
#if QT_VERSION >= 0x040300 #if QT_VERSION >= 0x040300
setContentsMargins(-2, -2, -2, -2); setContentsMargins(-2, -2, -2, -2);
#endif #endif

View File

@ -257,6 +257,13 @@ void GuiWorkArea::close()
} }
void GuiWorkArea::setFullScreen(bool full_screen)
{
setFrameStyle(QFrame::NoFrame);
buffer_view_->setFullScreen(full_screen);
}
BufferView & GuiWorkArea::bufferView() BufferView & GuiWorkArea::bufferView()
{ {
return *buffer_view_; return *buffer_view_;

View File

@ -109,6 +109,8 @@ public:
/// ///
~GuiWorkArea(); ~GuiWorkArea();
///
void setFullScreen(bool full_screen);
/// ///
void scheduleRedraw() { schedule_redraw_ = true; } void scheduleRedraw() { schedule_redraw_ = true; }
/// ///