From 3434cd81168e996b66ca6583d5b68cd19bf14c09 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Fri, 27 Mar 2009 03:14:47 +0100 Subject: Some fixes from avaddon-clone. Thank you --- src/mainview.cpp | 9 +++++---- src/tabbar.cpp | 4 ++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/mainview.cpp b/src/mainview.cpp index a1eed467..7238b966 100644 --- a/src/mainview.cpp +++ b/src/mainview.cpp @@ -91,8 +91,9 @@ MainView::~MainView() void MainView::showTabBar() { - bool always = ReKonfig::alwaysShowTabBar(); - if(always == true) + bool astb = ReKonfig::alwaysShowTabBar(); + + if(astb == true) { if( m_tabBar->isHidden() ) { @@ -593,7 +594,7 @@ void MainView::mouseDoubleClickEvent(QMouseEvent *event) newTab(); return; } - QTabWidget::mouseDoubleClickEvent(event); + KTabWidget::mouseDoubleClickEvent(event); } @@ -603,7 +604,7 @@ void MainView::contextMenuEvent(QContextMenuEvent *event) m_tabBar->contextMenuRequested(event->pos()); return; } - QTabWidget::contextMenuEvent(event); + KTabWidget::contextMenuEvent(event); } diff --git a/src/tabbar.cpp b/src/tabbar.cpp index 2e29fb0c..d00a95ce 100644 --- a/src/tabbar.cpp +++ b/src/tabbar.cpp @@ -53,7 +53,7 @@ TabBar::TabBar(QWidget *parent) QFont standardFont = KGlobalSettings::generalFont(); QString fontFamily = standardFont.family(); int dim = standardFont.pointSize(); - setFont( QFont(fontFamily, dim-2) ); + setFont( QFont(fontFamily, dim-1) ); } @@ -75,7 +75,7 @@ QSize TabBar::tabSizeHint (int index) const { w = s.width() / 3; } - int h = s.height() / 20; + int h = KTabBar::tabSizeHint(index).height(); QSize ts = QSize(w,h); return ts; -- cgit v1.2.1