mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
fixed user info popup user info loading
This commit is contained in:
parent
7703087fb4
commit
cf6bdeddc7
|
@ -51,7 +51,7 @@ ChannelView::ChannelView(BaseWidget *parent)
|
||||||
}));
|
}));
|
||||||
|
|
||||||
this->scrollBar_.getCurrentValueChanged().connect([this] {
|
this->scrollBar_.getCurrentValueChanged().connect([this] {
|
||||||
qDebug() << "getCurrentValueChanged";
|
// qDebug() << "getCurrentValueChanged";
|
||||||
|
|
||||||
// Whenever the scrollbar value has been changed, re-render the ChatWidgetView
|
// Whenever the scrollbar value has been changed, re-render the ChatWidgetView
|
||||||
this->actuallyLayoutMessages(true);
|
this->actuallyLayoutMessages(true);
|
||||||
|
|
|
@ -30,8 +30,11 @@ const QString &Label::getText() const
|
||||||
|
|
||||||
void Label::setText(const QString &text)
|
void Label::setText(const QString &text)
|
||||||
{
|
{
|
||||||
this->text_ = text;
|
if (this->text_ != text) {
|
||||||
this->updateSize();
|
this->text_ = text;
|
||||||
|
this->updateSize();
|
||||||
|
this->update();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
FontStyle Label::getFontStyle() const
|
FontStyle Label::getFontStyle() const
|
||||||
|
|
|
@ -190,8 +190,8 @@ void Scrollbar::setCurrentValue(qreal value)
|
||||||
value = std::max(this->minimum_, std::min(this->maximum_ - this->largeChange_,
|
value = std::max(this->minimum_, std::min(this->maximum_ - this->largeChange_,
|
||||||
value + this->smoothScrollingOffset_));
|
value + this->smoothScrollingOffset_));
|
||||||
|
|
||||||
if (std::abs(this->currentValue_ - value) > 0.000001) {
|
if (std::abs(this->currentValue_ - value) > 0.0001) {
|
||||||
qDebug() << "setCurrentValue";
|
// qDebug() << "setCurrentValue";
|
||||||
this->currentValue_ = value;
|
this->currentValue_ = value;
|
||||||
|
|
||||||
this->updateScroll();
|
this->updateScroll();
|
||||||
|
|
|
@ -366,7 +366,7 @@ UserInfoPopup::TimeoutWidget::TimeoutWidget()
|
||||||
a->setBorderColor(color1);
|
a->setBorderColor(color1);
|
||||||
|
|
||||||
QObject::connect(
|
QObject::connect(
|
||||||
*a, &RippleEffectLabel2::clicked, [ this, timeout = std::get<1>(item) ] {
|
*a, &RippleEffectLabel2::clicked, [this, timeout = std::get<1>(item)] {
|
||||||
this->buttonClicked.invoke(std::make_pair(Action::Timeout, timeout));
|
this->buttonClicked.invoke(std::make_pair(Action::Timeout, timeout));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -377,16 +377,21 @@ UserInfoPopup::TimeoutWidget::TimeoutWidget()
|
||||||
|
|
||||||
addTimeouts("sec", {{"1", 1}});
|
addTimeouts("sec", {{"1", 1}});
|
||||||
addTimeouts("min", {
|
addTimeouts("min", {
|
||||||
{"1", 1 * 60}, {"5", 5 * 60}, {"10", 10 * 60},
|
{"1", 1 * 60},
|
||||||
|
{"5", 5 * 60},
|
||||||
|
{"10", 10 * 60},
|
||||||
});
|
});
|
||||||
addTimeouts("hour", {
|
addTimeouts("hour", {
|
||||||
{"1", 1 * 60 * 60}, {"4", 4 * 60 * 60},
|
{"1", 1 * 60 * 60},
|
||||||
|
{"4", 4 * 60 * 60},
|
||||||
});
|
});
|
||||||
addTimeouts("days", {
|
addTimeouts("days", {
|
||||||
{"1", 1 * 60 * 60 * 24}, {"3", 3 * 60 * 60 * 24},
|
{"1", 1 * 60 * 60 * 24},
|
||||||
|
{"3", 3 * 60 * 60 * 24},
|
||||||
});
|
});
|
||||||
addTimeouts("weeks", {
|
addTimeouts("weeks", {
|
||||||
{"1", 1 * 60 * 60 * 24 * 7}, {"2", 2 * 60 * 60 * 24 * 7},
|
{"1", 1 * 60 * 60 * 24 * 7},
|
||||||
|
{"2", 2 * 60 * 60 * 24 * 7},
|
||||||
});
|
});
|
||||||
|
|
||||||
addButton(Ban, "ban", getApp()->resources->buttons.ban);
|
addButton(Ban, "ban", getApp()->resources->buttons.ban);
|
||||||
|
|
Loading…
Reference in a new issue