forked from qt-creator/qt-creator
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:
committed by
André Hartmann
parent
eee2245972
commit
1d933953a4
@@ -105,7 +105,10 @@ void NavigationTreeView::focusOutEvent(QFocusEvent *event)
|
|||||||
|
|
||||||
void NavigationTreeView::resizeEvent(QResizeEvent *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);
|
TreeView::resizeEvent(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user