Git: Fix columns visibility in branch view

The date column was always outside the visible
range and could only be reached with scrolling.

Change-Id: Ia690a4276f1b489b1f05c0d7f251b575509c9854
Fixes: QTCREATORBUG-21081
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Andre Hartmann
2018-09-16 20:35:25 +02:00
committed by André Hartmann
parent eee2245972
commit 1d933953a4

View File

@@ -105,7 +105,10 @@ void NavigationTreeView::focusOutEvent(QFocusEvent *event)
void NavigationTreeView::resizeEvent(QResizeEvent *event)
{
header()->setMinimumSectionSize(viewport()->width());
const int columns = header()->count();
const int minimumWidth = columns > 1 ? viewport()->width() / columns
: viewport()->width();
header()->setMinimumSectionSize(minimumWidth);
TreeView::resizeEvent(event);
}