mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-25 19:07:45 +00:00
Handle full screen mode for all work areas.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22904 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
f89f724f1d
commit
3e293bb692
@ -1848,17 +1848,15 @@ void GuiView::lfunUiToggle(FuncRequest const & cmd)
|
||||
#if QT_VERSION >= 0x040300
|
||||
setContentsMargins(0, 0, 0, 0);
|
||||
#endif
|
||||
// FIXME: it is not enough to take care of the current work area.
|
||||
// All work areas are affected by a full screen mode!
|
||||
d.current_work_area_->setFullScreen(false);
|
||||
for (int i = 0; i != d.splitter_->count(); ++i)
|
||||
d.tabWorkArea(i)->setFullScreen(false);
|
||||
menuBar()->show();
|
||||
statusBar()->show();
|
||||
} else {
|
||||
statusBar()->hide();
|
||||
menuBar()->hide();
|
||||
// FIXME: it is not enough to take care of the current work area.
|
||||
// All work areas are affected by a full screen mode!
|
||||
d.current_work_area_->setFullScreen(true);
|
||||
for (int i = 0; i != d.splitter_->count(); ++i)
|
||||
d.tabWorkArea(i)->setFullScreen(true);
|
||||
#if QT_VERSION >= 0x040300
|
||||
setContentsMargins(-2, -2, -2, -2);
|
||||
#endif
|
||||
|
@ -1047,6 +1047,15 @@ TabWorkArea::TabWorkArea(QWidget * parent) : QTabWidget(parent)
|
||||
}
|
||||
|
||||
|
||||
void TabWorkArea::setFullScreen(bool full_screen)
|
||||
{
|
||||
for (int i = 0; i != count(); ++i) {
|
||||
if (GuiWorkArea * wa = dynamic_cast<GuiWorkArea *>(widget(i)))
|
||||
wa->setFullScreen(full_screen);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void TabWorkArea::showBar(bool show)
|
||||
{
|
||||
tabBar()->setEnabled(show);
|
||||
|
@ -239,6 +239,8 @@ class TabWorkArea : public QTabWidget
|
||||
public:
|
||||
TabWorkArea(QWidget * parent = 0);
|
||||
|
||||
///
|
||||
void setFullScreen(bool full_screen);
|
||||
void showBar(bool show);
|
||||
void closeAll();
|
||||
bool setCurrentWorkArea(GuiWorkArea *);
|
||||
|
Loading…
Reference in New Issue
Block a user