]> git.lyx.org Git - lyx.git/commitdiff
Handle full screen mode for all work areas.
authorAbdelrazak Younes <younes@lyx.org>
Sat, 9 Feb 2008 18:29:15 +0000 (18:29 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Sat, 9 Feb 2008 18:29:15 +0000 (18:29 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22904 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt4/GuiView.cpp
src/frontends/qt4/GuiWorkArea.cpp
src/frontends/qt4/GuiWorkArea.h

index 929dd8097e09bc7887ce214e1f90714c3f1bbb63..ffda79e6d7e0f9e64658558a2cef15d54f16169f 100644 (file)
@@ -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
index 60e48f7cbfd6601f1b1cde316ac3096cc9a88650..5091037b220b199867437201359ab284583ae598 100644 (file)
@@ -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);
index ddfcabf18bcacad1b9ec22160dc2c2c8f33ef62d..0da12f8e3c4184d3c25f3c32e73bde3010eb98b0 100644 (file)
@@ -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 *);