Merge branch 'master' of https://github.com/fourtf/chatterino2
This commit is contained in:
@@ -4,6 +4,7 @@
|
|||||||
#include "messages/limitedqueuesnapshot.h"
|
#include "messages/limitedqueuesnapshot.h"
|
||||||
|
|
||||||
#include <boost/signals2.hpp>
|
#include <boost/signals2.hpp>
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <mutex>
|
#include <mutex>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
@@ -102,7 +103,8 @@ private:
|
|||||||
int limit;
|
int limit;
|
||||||
int buffer;
|
int buffer;
|
||||||
};
|
};
|
||||||
}
|
|
||||||
}
|
} // namespace messages
|
||||||
|
} // namespace chatterino
|
||||||
|
|
||||||
#endif // LIMITEDQUEUE_H
|
#endif // LIMITEDQUEUE_H
|
||||||
|
|||||||
@@ -49,6 +49,17 @@ ChatWidgetView::layoutMessages()
|
|||||||
|
|
||||||
int start = this->scrollbar.getCurrentValue();
|
int start = this->scrollbar.getCurrentValue();
|
||||||
|
|
||||||
|
if (messages.getLength() <= start) {
|
||||||
|
// The scrollbar wants to show more values than we can offer
|
||||||
|
|
||||||
|
// just return for now
|
||||||
|
return false;
|
||||||
|
|
||||||
|
|
||||||
|
// Lower start value to the last message
|
||||||
|
// start = messages.getLength() - 1;
|
||||||
|
}
|
||||||
|
|
||||||
int y = -(messages[start].get()->getHeight() *
|
int y = -(messages[start].get()->getHeight() *
|
||||||
(fmod(this->scrollbar.getCurrentValue(), 1)));
|
(fmod(this->scrollbar.getCurrentValue(), 1)));
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user