fix a crash using middle click scroll on chat window (#1870)

* fix middle click scroll crash

* Update CHANGELOG.md

* get the float dpi, not int
This commit is contained in:
fourst4r
2020-09-27 01:47:20 +12:00
committed by GitHub
parent 06cb88f6c2
commit 2f3accf3cb
2 changed files with 2 additions and 2 deletions
+1 -2
View File
@@ -1969,8 +1969,7 @@ void ChannelView::disableScrolling()
void ChannelView::scrollUpdateRequested()
{
const qreal dpi =
QGuiApplication::screenAt(this->pos())->devicePixelRatio();
const qreal dpi = this->devicePixelRatioF();
const qreal delta = dpi * (this->currentMousePosition_.y() -
this->lastMiddlePressPosition_.y());
const int cursorHeight = this->cursors_.neutral.pixmap().height();