mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
fixed scrollbars
This commit is contained in:
parent
dd3843cf6d
commit
a09b08f9b0
|
@ -7,6 +7,7 @@
|
|||
#include "widgets/chatwidget.h"
|
||||
|
||||
#include <math.h>
|
||||
#include <QDebug>
|
||||
#include <QPainter>
|
||||
#include <functional>
|
||||
|
||||
|
@ -61,14 +62,16 @@ ChatWidgetView::layoutMessages()
|
|||
|
||||
message->layout(this->width(), true);
|
||||
|
||||
qDebug() << message->getHeight();
|
||||
h -= message->getHeight();
|
||||
|
||||
if (h < 0) {
|
||||
this->scrollbar.setLargeChange((messages.length() - i) +
|
||||
this->scrollbar.setLargeChange((messages.size() - i) +
|
||||
(qreal)h / message->getHeight());
|
||||
this->scrollbar.setValue(this->scrollbar.getValue());
|
||||
|
||||
showScrollbar = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue