diff options
author | megabigbug <megabigbug@arrakis.(none)> | 2009-12-24 13:33:47 +0100 |
---|---|---|
committer | megabigbug <megabigbug@arrakis.(none)> | 2009-12-24 13:33:47 +0100 |
commit | 67682752881f2611f70989127e38a03a0a582b02 (patch) | |
tree | d7781f2f7b8e64756288c5f66e8baad84f7d620e /src | |
parent | rekonq 0.3.26 (diff) | |
download | rekonq-67682752881f2611f70989127e38a03a0a582b02.tar.xz |
hide tabbar in fulscreen mode
Diffstat (limited to 'src')
-rw-r--r-- | src/mainview.cpp | 20 | ||||
-rw-r--r-- | src/mainview.h | 2 | ||||
-rw-r--r-- | src/mainwindow.cpp | 7 |
3 files changed, 22 insertions, 7 deletions
diff --git a/src/mainview.cpp b/src/mainview.cpp index 46cd9a15..fb6f202d 100644 --- a/src/mainview.cpp +++ b/src/mainview.cpp @@ -186,12 +186,15 @@ void MainView::updateTabBar() { if (ReKonfig::alwaysShowTabBar()) { - if (m_tabBar->isHidden()) + if (!isTabBarHidden()) { - m_tabBar->show(); - m_addTabButton->show(); + if (m_tabBar->isHidden()) + { + m_tabBar->show(); + m_addTabButton->show(); + } + updateTabButtonPosition(); } - updateTabButtonPosition(); return; } @@ -200,7 +203,7 @@ void MainView::updateTabBar() m_tabBar->hide(); m_addTabButton->hide(); } - else + else if (!isTabBarHidden()) { if (m_tabBar->isHidden()) { @@ -212,6 +215,13 @@ void MainView::updateTabBar() } +void MainView::setTabBarHidden(bool hide) +{ + m_addTabButton->setVisible(!hide); + KTabWidget::setTabBarHidden(hide); +} + + void MainView::webReload() { WebTab *webTab = currentWebTab(); diff --git a/src/mainview.h b/src/mainview.h index f57c30b5..f8a8c283 100644 --- a/src/mainview.h +++ b/src/mainview.h @@ -83,6 +83,8 @@ public: */ void updateTabBar(); + void setTabBarHidden(bool hide); + QToolButton *addTabButton() const; void clear(); diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index b4174191..de755c76 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -800,7 +800,7 @@ void MainWindow::viewFullScreen(bool makeFullScreen) // state flags static bool bookmarksToolBarFlag; static bool sidePanelFlag; - static bool bookmarksPanelFlag; + static bool bookmarksPanelFlag; if (makeFullScreen == true) { @@ -808,10 +808,12 @@ void MainWindow::viewFullScreen(bool makeFullScreen) bookmarksToolBarFlag = m_bmBar->isHidden(); m_bmBar->hide(); + m_view->setTabBarHidden(true); + sidePanelFlag = sidePanel()->isHidden(); sidePanel()->hide(); - bookmarksPanelFlag = bookmarksPanel()->isHidden(); + bookmarksPanelFlag = bookmarksPanel()->isHidden(); bookmarksPanel()->hide(); // hide main toolbar @@ -821,6 +823,7 @@ void MainWindow::viewFullScreen(bool makeFullScreen) { // show main toolbar m_mainBar->show(); + m_view->setTabBarHidden(false); // restore previous state if (!bookmarksToolBarFlag) |