mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +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
|
#if QT_VERSION >= 0x040300
|
||||||
setContentsMargins(0, 0, 0, 0);
|
setContentsMargins(0, 0, 0, 0);
|
||||||
#endif
|
#endif
|
||||||
// FIXME: it is not enough to take care of the current work area.
|
for (int i = 0; i != d.splitter_->count(); ++i)
|
||||||
// All work areas are affected by a full screen mode!
|
d.tabWorkArea(i)->setFullScreen(false);
|
||||||
d.current_work_area_->setFullScreen(false);
|
|
||||||
menuBar()->show();
|
menuBar()->show();
|
||||||
statusBar()->show();
|
statusBar()->show();
|
||||||
} else {
|
} else {
|
||||||
statusBar()->hide();
|
statusBar()->hide();
|
||||||
menuBar()->hide();
|
menuBar()->hide();
|
||||||
// FIXME: it is not enough to take care of the current work area.
|
for (int i = 0; i != d.splitter_->count(); ++i)
|
||||||
// All work areas are affected by a full screen mode!
|
d.tabWorkArea(i)->setFullScreen(true);
|
||||||
d.current_work_area_->setFullScreen(true);
|
|
||||||
#if QT_VERSION >= 0x040300
|
#if QT_VERSION >= 0x040300
|
||||||
setContentsMargins(-2, -2, -2, -2);
|
setContentsMargins(-2, -2, -2, -2);
|
||||||
#endif
|
#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)
|
void TabWorkArea::showBar(bool show)
|
||||||
{
|
{
|
||||||
tabBar()->setEnabled(show);
|
tabBar()->setEnabled(show);
|
||||||
|
@ -239,6 +239,8 @@ class TabWorkArea : public QTabWidget
|
|||||||
public:
|
public:
|
||||||
TabWorkArea(QWidget * parent = 0);
|
TabWorkArea(QWidget * parent = 0);
|
||||||
|
|
||||||
|
///
|
||||||
|
void setFullScreen(bool full_screen);
|
||||||
void showBar(bool show);
|
void showBar(bool show);
|
||||||
void closeAll();
|
void closeAll();
|
||||||
bool setCurrentWorkArea(GuiWorkArea *);
|
bool setCurrentWorkArea(GuiWorkArea *);
|
||||||
|
Loading…
Reference in New Issue
Block a user