mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
Fullscreen support: Small cleanups. Still not sure why the scrollbar is not properly updated...
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23075 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
2a2f4ee163
commit
42d707773d
@ -1868,29 +1868,23 @@ void GuiView::lfunUiToggle(FuncRequest const & cmd)
|
||||
d.toolbars_->toggleFullScreen(!isFullScreen());
|
||||
|
||||
if (isFullScreen()) {
|
||||
showNormal();
|
||||
for (int i = 0; i != d.splitter_->count(); ++i)
|
||||
d.tabWorkArea(i)->setFullScreen(false);
|
||||
#if QT_VERSION >= 0x040300
|
||||
setContentsMargins(0, 0, 0, 0);
|
||||
#endif
|
||||
for (int i = 0; i != d.splitter_->count(); ++i)
|
||||
d.tabWorkArea(i)->setFullScreen(false);
|
||||
showNormal();
|
||||
menuBar()->show();
|
||||
statusBar()->show();
|
||||
if (lyxrc.full_screen_scrollbar && d.current_work_area_)
|
||||
d.current_work_area_->
|
||||
setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded);
|
||||
} else {
|
||||
if (lyxrc.full_screen_scrollbar && d.current_work_area_)
|
||||
d.current_work_area_->
|
||||
setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
||||
statusBar()->hide();
|
||||
menuBar()->hide();
|
||||
for (int i = 0; i != d.splitter_->count(); ++i)
|
||||
d.tabWorkArea(i)->setFullScreen(true);
|
||||
#if QT_VERSION >= 0x040300
|
||||
setContentsMargins(-2, -2, -2, -2);
|
||||
#endif
|
||||
showFullScreen();
|
||||
statusBar()->hide();
|
||||
menuBar()->hide();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -259,8 +259,15 @@ void GuiWorkArea::close()
|
||||
|
||||
void GuiWorkArea::setFullScreen(bool full_screen)
|
||||
{
|
||||
setFrameStyle(QFrame::NoFrame);
|
||||
buffer_view_->setFullScreen(full_screen);
|
||||
if (full_screen) {
|
||||
setFrameStyle(QFrame::NoFrame);
|
||||
if (lyxrc.full_screen_scrollbar)
|
||||
setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
||||
} else {
|
||||
setFrameStyle(QFrame::Box);
|
||||
setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user