summaryrefslogtreecommitdiff
path: root/src/tabwindow
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2012-09-22 12:36:01 +0200
committerAndrea Diamantini <adjam7@gmail.com>2012-12-10 02:48:05 +0100
commitb87d73147b681d548c11785004c21e469c026391 (patch)
tree514903d91f781c2c9c05236d747bc614be171314 /src/tabwindow
parentIntegrated spell checking for rekonq2 (lindsay's work imported) (diff)
downloadrekonq-b87d73147b681d548c11785004c21e469c026391.tar.xz
Re-enable fullscreen capabilities
Diffstat (limited to 'src/tabwindow')
-rw-r--r--src/tabwindow/tabbar.cpp5
-rw-r--r--src/tabwindow/tabwindow.cpp11
-rw-r--r--src/tabwindow/tabwindow.h2
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;