diff options
| author | megabigbug <megabigbug@arrakis.(none)> | 2009-12-24 14:30:43 +0100 | 
|---|---|---|
| committer | megabigbug <megabigbug@arrakis.(none)> | 2009-12-24 14:30:43 +0100 | 
| commit | 69587a901be8391a59fa0665129d95cee3967775 (patch) | |
| tree | 5830ba4b7d44768e7da9d65335ef28111827a1c9 /src | |
| parent | hide tabbar in fulscreen mode (diff) | |
| download | rekonq-69587a901be8391a59fa0665129d95cee3967775.tar.xz | |
in fullscreen mode: show toolbar tabbar when mouse is on top of the screen
Diffstat (limited to 'src')
| -rw-r--r-- | src/mainwindow.cpp | 13 | ||||
| -rw-r--r-- | src/mainwindow.h | 1 | ||||
| -rw-r--r-- | src/webview.cpp | 11 | 
3 files changed, 21 insertions, 4 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index de755c76..3b0f6b54 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -797,12 +797,19 @@ void MainWindow::viewTextSmaller()  void MainWindow::viewFullScreen(bool makeFullScreen)  { +    setWidgetsVisible(!makeFullScreen); +    KToggleFullScreenAction::setFullScreen(this, makeFullScreen); +} + + +void MainWindow::setWidgetsVisible(bool makeVisible) +{      // state flags      static bool bookmarksToolBarFlag;      static bool sidePanelFlag;      static bool bookmarksPanelFlag; -    if (makeFullScreen == true) +    if (!makeVisible)      {          // save current state          bookmarksToolBarFlag = m_bmBar->isHidden(); @@ -832,9 +839,7 @@ void MainWindow::viewFullScreen(bool makeFullScreen)              sidePanel()->show();          if (!bookmarksPanelFlag)              bookmarksPanel()->show(); -    } - -    KToggleFullScreenAction::setFullScreen(this, makeFullScreen); +    }      } diff --git a/src/mainwindow.h b/src/mainwindow.h index 95964e22..808f5f9a 100644 --- a/src/mainwindow.h +++ b/src/mainwindow.h @@ -71,6 +71,7 @@ public:      QAction *actionByName(const QString name);      virtual QSize sizeHint() const;      virtual KActionCollection *actionCollection () const; +    void setWidgetsVisible(bool makeFullScreen);  private:      void setupActions(); diff --git a/src/webview.cpp b/src/webview.cpp index 462adc08..a35b7143 100644 --- a/src/webview.cpp +++ b/src/webview.cpp @@ -313,6 +313,17 @@ void WebView::mousePressEvent(QMouseEvent *event)  void WebView::mouseMoveEvent(QMouseEvent *event)  {      m_mousePos = event->pos(); +    if (Application::instance()->mainWindow()->isFullScreen()) +    {         +        if (event->pos().y()>=0 && event->pos().y()<=4) +        { +            Application::instance()->mainWindow()->setWidgetsVisible(true);  +        } +        else +        { +            Application::instance()->mainWindow()->setWidgetsVisible(false);  +        } +    }      KWebView::mouseMoveEvent(event);  }  | 
