mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
improved code style
This commit is contained in:
parent
394009dda8
commit
73a067f42f
2 changed files with 8 additions and 3 deletions
|
@ -65,12 +65,15 @@ ChannelView::ChannelView(BaseWidget *parent)
|
|||
this->queueUpdate();
|
||||
});
|
||||
|
||||
this->scrollBar_.getDesiredValueChanged().connect(
|
||||
[this] { this->pausedByScrollingUp_ = !this->scrollBar_.isAtBottom(); });
|
||||
|
||||
this->connections_.push_back(app->windows->repaintGifs.connect([&] {
|
||||
this->queueUpdate(); //
|
||||
}));
|
||||
|
||||
this->connections_.push_back(app->windows->layout.connect([&](Channel *channel) {
|
||||
if (channel == nullptr || this->channel.get() == channel) {
|
||||
if (channel == nullptr || this->channel_.get() == channel) {
|
||||
this->layoutMessages();
|
||||
}
|
||||
}));
|
||||
|
@ -84,7 +87,7 @@ ChannelView::ChannelView(BaseWidget *parent)
|
|||
this->layoutMessages(); //
|
||||
}));
|
||||
|
||||
QObject::connect(goToBottom, &RippleEffectLabel::clicked, this, [=] {
|
||||
QObject::connect(this->goToBottom_, &RippleEffectLabel::clicked, this, [=] {
|
||||
QTimer::singleShot(180, [=] {
|
||||
this->scrollBar_.scrollToBottom(
|
||||
app->settings->enableSmoothScrollingNewMessages.getValue());
|
||||
|
@ -1202,7 +1205,7 @@ bool ChannelView::tryGetMessageAt(QPoint p, std::shared_ptr<messages::MessageLay
|
|||
|
||||
int ChannelView::getLayoutWidth() const
|
||||
{
|
||||
if (this->scrollBar.isVisible())
|
||||
if (this->scrollBar_.isVisible())
|
||||
return int(this->width() - 8 * this->getScale());
|
||||
|
||||
return this->width();
|
||||
|
|
|
@ -150,6 +150,8 @@ private:
|
|||
|
||||
std::unordered_set<std::shared_ptr<messages::MessageLayout>> messagesOnScreen_;
|
||||
|
||||
int getLayoutWidth() const;
|
||||
|
||||
private slots:
|
||||
void wordFlagsChanged()
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue