forked from qt-creator/qt-creator
HeaderViewStretcher: Fix bug in resize code
Change-Id: Ia62d4c64418e7d616b5dd90d0eda2a2ee985c2d8 Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
@@ -68,7 +68,7 @@ bool HeaderViewStretcher::eventFilter(QObject *obj, QEvent *ev)
|
||||
if (hv->resizeMode(m_columnToStretch) == QHeaderView::Interactive) {
|
||||
QResizeEvent *re = static_cast<QResizeEvent*>(ev);
|
||||
int diff = re->size().width() - re->oldSize().width() ;
|
||||
hv->resizeSection(m_columnToStretch, qMax(32, hv->sectionSize(1) + diff));
|
||||
hv->resizeSection(m_columnToStretch, qMax(32, hv->sectionSize(m_columnToStretch) + diff));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
#include "icore.h"
|
||||
#include "id.h"
|
||||
|
||||
#include <utils/treewidgetcolumnstretcher.h>
|
||||
#include <utils/headerviewstretcher.h>
|
||||
|
||||
#include <QKeyEvent>
|
||||
#include <QShortcut>
|
||||
|
||||
Reference in New Issue
Block a user