From 604a10c4fc3e927e0e3265dc37e163366e00cd86 Mon Sep 17 00:00:00 2001 From: Yoann Laissus Date: Sun, 5 Aug 2012 14:22:44 +0200 Subject: * Split updateTabBar() into two separate methods - updateTabBarVisibility(): used to react only on "alwaysShowTabBar" settings - updateAddTabButton(): used to react only on tabbar changes * Improve handling of the add tab button. updateAddTabButton() is now called on any tab layout changed instead of being called in any function which manipulate tabs. * Use a tab height computed with KTabBar instead of the add tab button height with a magical number. It fixes some issues with the Bespin theme. BUG: 304325 --- src/mainview.h | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'src/mainview.h') diff --git a/src/mainview.h b/src/mainview.h index 9378f4bd..89ee36ec 100644 --- a/src/mainview.h +++ b/src/mainview.h @@ -79,12 +79,7 @@ public: void addNewTabButton(QAction *); - /** - * show and hide TabBar if user doesn't choose - * "Always Show TabBar" option - * - */ - void updateTabBar(); + void updateTabBarVisibility(); inline QToolButton *addTabButton() const { @@ -158,6 +153,7 @@ public Q_SLOTS: private Q_SLOTS: void currentChanged(int index); + void updateAddTabButton(); void webViewLoadStarted(); void webViewLoadFinished(bool ok); @@ -169,9 +165,6 @@ private Q_SLOTS: void openClosedTab(); -protected: - virtual void resizeEvent(QResizeEvent *event); - private: /** * This function creates (if not exists) and returns a QLabel -- cgit v1.2.1