From 731110732d286ef4241e0a5cf7e0a9d6f255aabe Mon Sep 17 00:00:00 2001 From: Yoann Laissus Date: Sun, 5 Aug 2012 18:29:43 +0200 Subject: Choose a better name for the tabWidth in TabBar::showTabPreview() --- src/tabbar.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/tabbar.cpp b/src/tabbar.cpp index ee210770..5339a7d0 100644 --- a/src/tabbar.cpp +++ b/src/tabbar.cpp @@ -201,21 +201,21 @@ void TabBar::showTabPreview() m_previewPopup = new TabPreviewPopup(indexedTab , this); - int w = tabSizeHint(m_currentTabPreviewIndex).width(); + int tabWidth = tabSizeHint(m_currentTabPreviewIndex).width(); int tabBarWidth = mv->size().width(); - int leftIndex = tabRect(m_currentTabPreviewIndex).x() + (tabRect(m_currentTabPreviewIndex).width() - w) / 2; + int leftIndex = tabRect(m_currentTabPreviewIndex).x() + (tabRect(m_currentTabPreviewIndex).width() - tabWidth) / 2; int popupWidth = m_previewPopup.data()->thumbnailSize().width(); // Center the popup if the tab width is bigger or smaller - leftIndex += (w - popupWidth) / 2; + leftIndex += (tabWidth - popupWidth) / 2; if (leftIndex < 0) { leftIndex = 0; } - else if (leftIndex + w > tabBarWidth) + else if (leftIndex + tabWidth > tabBarWidth) { - leftIndex = tabBarWidth - w; + leftIndex = tabBarWidth - tabWidth; } QPoint pos(leftIndex, tabRect(m_currentTabPreviewIndex).y() + tabRect(m_currentTabPreviewIndex).height()); -- cgit v1.2.1