Fix hidden last row of bytes by horizontal scrollbar with vertical scrollbar on

BUG: 343809

FIXED-IN: 0.16.3 (Applications 15.04.3)
parent a7f5b7d5
......@@ -177,18 +177,26 @@ void ColumnsView::updateScrollBars()
{
QSize viewSize = maximumViewportSize();
const bool needsVerticalBar = ( columnsHeight() > viewSize.height() );
const bool needsHorizontalBar = ( columnsWidth() > viewSize.width() );
const int scrollBarWidth = style()->pixelMetric( QStyle::PM_ScrollBarExtent );
const PixelY usedHeight = columnsHeight();
const PixelX usedWidth = columnsWidth();
if( needsVerticalBar )
const bool needsVerticalBarDefinitely = ( usedHeight > viewSize.height() );
const bool needsHorizontalBarDefinitely = ( usedWidth > viewSize.width() );
if( needsVerticalBarDefinitely )
viewSize.rwidth() -= scrollBarWidth;
if( needsHorizontalBarDefinitely )
viewSize.rheight() -= scrollBarWidth;
// check again if bars are not needed now
if( !needsVerticalBarDefinitely && usedHeight > viewSize.height() )
viewSize.rwidth() -= scrollBarWidth;
if( needsHorizontalBar )
if( !needsHorizontalBarDefinitely && usedWidth > viewSize.width() )
viewSize.rheight() -= scrollBarWidth;
verticalScrollBar()->setRange( 0, columnsHeight()-viewSize.height() );
verticalScrollBar()->setRange( 0, usedHeight-viewSize.height() );
verticalScrollBar()->setPageStep( viewSize.height() );
horizontalScrollBar()->setRange( 0, columnsWidth()-viewSize.width() );
horizontalScrollBar()->setRange( 0, usedWidth-viewSize.width() );
horizontalScrollBar()->setPageStep( viewSize.width() );
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment