Visual and scroll behavior changes to groupview
Scroll by rows, not pixels. Paint the checkboxy thing again! Make0 it behave. Set the group header height properly.
This commit is contained in:
parent
0d30a2655f
commit
18f532b0d7
2 changed files with 134 additions and 129 deletions
|
@ -121,6 +121,8 @@ void GroupView::updateGeometries()
|
|||
category->m_verticalPosition = totalHeight;
|
||||
totalHeight += category->totalHeight() + m_categoryMargin;
|
||||
}
|
||||
auto category = m_groups.last();
|
||||
int itemScroll = category->contentHeight() / category->numRows();
|
||||
/*
|
||||
// remove the last margin (we don't want it)
|
||||
totalHeight -= m_categoryMargin;
|
||||
|
@ -128,6 +130,10 @@ void GroupView::updateGeometries()
|
|||
totalHeight += m_categoryMargin;
|
||||
*/
|
||||
totalHeight += m_bottomMargin;
|
||||
verticalScrollBar()->setSingleStep ( itemScroll );
|
||||
const int rowsPerPage = qMax ( viewport()->height() / itemScroll, 1 );
|
||||
verticalScrollBar()->setPageStep ( rowsPerPage * itemScroll );
|
||||
|
||||
verticalScrollBar()->setRange(0, totalHeight - height());
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue