diff options
Diffstat (limited to 'src/tabwindow')
-rw-r--r-- | src/tabwindow/tabbar.cpp | 5 | ||||
-rw-r--r-- | src/tabwindow/tabwindow.cpp | 11 | ||||
-rw-r--r-- | src/tabwindow/tabwindow.h | 2 |
3 files changed, 18 insertions, 0 deletions
diff --git a/src/tabwindow/tabbar.cpp b/src/tabwindow/tabbar.cpp index 18393cf9..a1e69745 100644 --- a/src/tabwindow/tabbar.cpp +++ b/src/tabwindow/tabbar.cpp @@ -102,6 +102,11 @@ QSize TabBar::tabSizeHint(int index) const int h = size().height(); + // this because it may happen sometimes (eg: exiting fullscreen) + // that tabbar height is set to ZERO. And this is NOT good... + if (h == 0) + h = 30; + QSize ts = QSize(w, h); return ts; } diff --git a/src/tabwindow/tabwindow.cpp b/src/tabwindow/tabwindow.cpp index ba355e51..297653e8 100644 --- a/src/tabwindow/tabwindow.cpp +++ b/src/tabwindow/tabwindow.cpp @@ -43,6 +43,7 @@ #include <KLocalizedString> #include <KStandardDirs> #include <KUrl> +#include <KToggleFullScreenAction> #include <KWindowInfo> #include <KWindowSystem> @@ -146,6 +147,8 @@ WebWindow *TabWindow::prepareNewTab(WebPage *page) connect(tab, SIGNAL(pageCreated(WebPage *)), this, SLOT(pageCreated(WebPage *))); + connect(tab, SIGNAL(setFullScreen(bool)), this, SLOT(setFullScreen(bool))); + return tab; } @@ -490,3 +493,11 @@ void TabWindow::restoreClosedTab(int i) // just to get sure... m_recentlyClosedTabs.removeAll(history); } + + +void TabWindow::setFullScreen(bool makeFullScreen) +{ + tabBar()->setVisible(!makeFullScreen); + _addTabButton->setVisible(!makeFullScreen); + KToggleFullScreenAction::setFullScreen(this, makeFullScreen); +} diff --git a/src/tabwindow/tabwindow.h b/src/tabwindow/tabwindow.h index 750cac5f..882ca4e9 100644 --- a/src/tabwindow/tabwindow.h +++ b/src/tabwindow/tabwindow.h @@ -100,6 +100,8 @@ private Q_SLOTS: void reloadAllTabs(); void restoreClosedTab(int i); + void setFullScreen(bool); + private: // the new tab button QToolButton *_addTabButton; |