Change views to scroll-per-pixel.

This commit is contained in:
craig.p.drummond
2014-02-09 15:46:14 +00:00
committed by craig.p.drummond
parent e5b87026bc
commit 8177e79d97
3 changed files with 3 additions and 0 deletions

View File

@@ -121,6 +121,7 @@
74. Dont react to mouse-release event in coverwidget if an override cursor has
been set. Fixes the case, with Qt5 builds, where a drag is started on the
cover widget causes interface to expand/collapse.
75. Change views to scroll-per-pixel.
1.2.2
-----

View File

@@ -45,6 +45,7 @@ ListView::ListView(QWidget *parent)
setAlternatingRowColors(false);
setUniformItemSizes(true);
setAttribute(Qt::WA_MouseTracking);
setVerticalScrollMode(QAbstractItemView::ScrollPerPixel);
connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), SLOT(showCustomContextMenu(const QPoint &)));
}

View File

@@ -100,6 +100,7 @@ TreeView::TreeView(QWidget *parent, bool menuAlwaysAllowed)
setAlternatingRowColors(false);
setSelectionMode(QAbstractItemView::ExtendedSelection);
setSelectionBehavior(QAbstractItemView::SelectRows);
setVerticalScrollMode(QAbstractItemView::ScrollPerPixel);
// Treeview does not seem to need WA_MouseTracking set, even with QGtkStyle items still
// highlight under mouse. And enabling WA_MouseTracking here seems to cause drag-n-drop
// errors if an item is dragged onto playqueue whilst playqueue has a selected item!