Changeset View
Changeset View
Standalone View
Standalone View
ThumbnailView/ThumbnailDND.cpp
Context not available. | |||||
55 | 55 | | |||
---|---|---|---|---|---|
56 | if ( ( event->pos().y() < 10 ) ) | 56 | if ( ( event->pos().y() < 10 ) ) | ||
57 | widget()->scrollTo( widget()->indexUnderCursor(), QAbstractItemView::PositionAtCenter ); | 57 | widget()->scrollTo( widget()->indexUnderCursor(), QAbstractItemView::PositionAtCenter ); | ||
58 | #if QT_VERSION >= QT_VERSION_CHECK(5, 8, 0) | ||||
58 | if ( ( event->pos().y() > widget()->viewport()->visibleRegion().cbegin()->height() - 10 ) ) | 59 | if ( ( event->pos().y() > widget()->viewport()->visibleRegion().cbegin()->height() - 10 ) ) | ||
60 | #else | ||||
61 | if ( ( event->pos().y() > widget()->viewport()->visibleRegion().rects().first().height() - 10 ) ) | ||||
62 | #endif | ||||
59 | widget()->scrollTo( widget()->indexUnderCursor(), QAbstractItemView::PositionAtCenter ); | 63 | widget()->scrollTo( widget()->indexUnderCursor(), QAbstractItemView::PositionAtCenter ); | ||
60 | bool left = ( event->pos().x() - rect.x() < rect.width()/2 ); | 64 | bool left = ( event->pos().x() - rect.x() < rect.width()/2 ); | ||
61 | if ( left ) { | 65 | if ( left ) { | ||
Context not available. |