summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorYoann Laissus <yoann.laissus@gmail.com>2012-08-05 18:29:43 +0200
committerAndrea Diamantini <adjam7@gmail.com>2012-08-14 17:47:42 +0200
commit731110732d286ef4241e0a5cf7e0a9d6f255aabe (patch)
treec11737c05222387702e0b99a15e1fc1235fb3eb2 /src
parentCenter the tab preview popup if the tab width is bigger or smaller (diff)
downloadrekonq-731110732d286ef4241e0a5cf7e0a9d6f255aabe.tar.xz
Choose a better name for the tabWidth in TabBar::showTabPreview()
Diffstat (limited to 'src')
-rw-r--r--src/tabbar.cpp10
1 files 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());