diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2013-11-29 17:05:15 +0100 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2013-11-29 17:05:15 +0100 |
commit | 39e797d2302a9ea1a48c13863b9c22f384e9d1f6 (patch) | |
tree | 772e7e97a97d3bc5a647fdf0b0a35a4002c18aab /src | |
parent | Fix awkward string in proxy settings (diff) | |
download | rekonq-39e797d2302a9ea1a48c13863b9c22f384e9d1f6.tar.xz |
Changing tab width management behaviour
Following hints from
BUG: 322991
Diffstat (limited to 'src')
-rw-r--r-- | src/tabwindow/tabbar.cpp | 4 | ||||
-rw-r--r-- | src/tabwindow/tabbar.h | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/tabwindow/tabbar.cpp b/src/tabwindow/tabbar.cpp index b64e5655..40ced0a6 100644 --- a/src/tabwindow/tabbar.cpp +++ b/src/tabwindow/tabbar.cpp @@ -100,13 +100,15 @@ QSize TabBar::tabSizeHint(int index) const QWidget* p = qobject_cast<QWidget *>(parent()); int w; + // if tab is pinned... if (tabData(index).toBool()) { w = 36; } else { - int tabWidgetWidth = p->size().width(); + // available width is tab widget width minus addTabButton width + int tabWidgetWidth = p->size().width() - 24; w = c_baseTabWidth; if (w * count() > tabWidgetWidth) { diff --git a/src/tabwindow/tabbar.h b/src/tabwindow/tabbar.h index 73b5802e..f842c9ff 100644 --- a/src/tabwindow/tabbar.h +++ b/src/tabwindow/tabbar.h @@ -104,8 +104,8 @@ private: int m_currentTabPreviewIndex; bool m_isFirstTimeOnTab; - static const int c_baseTabWidth = 200; - static const int c_minTabWidth = 100; + static const int c_baseTabWidth = 250; + static const int c_minTabWidth = 50; }; #endif // TAB_BAR |