Commit 5939035e authored by Kevin Kofler's avatar Kevin Kofler
Browse files

Kompare: komparepart: Show a scrollbar only when it makes sense.

(Another regression from the QTreeWidget port.)

svn path=/trunk/KDE/kdesdk/kompare/; revision=1263239
parent 9c683ad5
......@@ -19,6 +19,7 @@
#include "komparelistview.h"
#include <QtGui/QStyle>
#include <QtGui/QPainter>
#include <QtCore/QRegExp>
#include <QtCore/QTimer>
......@@ -225,7 +226,7 @@ int KompareListView::maxScrollId()
int KompareListView::contentsHeight()
{
return verticalScrollBar()->maximum() + viewport()->height();
return verticalScrollBar()->maximum() + viewport()->height() - style()->pixelMetric( QStyle::PM_ScrollBarExtent );
}
int KompareListView::contentsWidth()
......
......@@ -306,7 +306,7 @@ int KompareSplitter::pageSize()
{
if(widget(0)) {
KompareListView *view = listView(0);
return view->visibleHeight() - QStyle::PM_ScrollBarExtent;
return view->visibleHeight() - view->style()->pixelMetric( QStyle::PM_ScrollBarExtent );
}
return 1;
}
......
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