mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
dream come true
This commit is contained in:
parent
e047a55da8
commit
c3287a1da8
2 changed files with 9 additions and 11 deletions
|
@ -789,8 +789,6 @@ void ChannelView::mouseReleaseEvent(QMouseEvent *event)
|
|||
|
||||
float distance = util::distanceBetweenPoints(this->lastPressPosition, event->screenPos());
|
||||
|
||||
// qDebug() << "Distance: " << distance;
|
||||
|
||||
if (fabsf(distance) > 15.f) {
|
||||
// It wasn't a proper click, so we don't care about that here
|
||||
return;
|
||||
|
@ -799,7 +797,7 @@ void ChannelView::mouseReleaseEvent(QMouseEvent *event)
|
|||
// If you clicked and released less than X pixels away, it counts
|
||||
// as a click!
|
||||
|
||||
// show user thing pajaW
|
||||
this->layoutMessages();
|
||||
|
||||
std::shared_ptr<messages::MessageLayout> layout;
|
||||
QPoint relativePos;
|
||||
|
@ -814,7 +812,7 @@ void ChannelView::mouseReleaseEvent(QMouseEvent *event)
|
|||
// message under cursor is collapsed
|
||||
if (layout->flags & MessageLayout::Collapsed) {
|
||||
layout->flags &= MessageLayout::Collapsed;
|
||||
this->layoutMessages();
|
||||
// this->layoutMessages();
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -88,11 +88,9 @@ QLayout *AppearancePage::createThemeColorChanger()
|
|||
button->setFlat(true);
|
||||
button->setFixedWidth(64);
|
||||
|
||||
// SIGNALS
|
||||
QObject::connect(slider, &QSlider::valueChanged, this, [button, &themeHue](int value) mutable {
|
||||
auto setButtonColor = [button](int value) mutable {
|
||||
double newValue = value / 100.0;
|
||||
|
||||
themeHue.setValue(newValue);
|
||||
singletons::ThemeManager::getInstance().themeHue.setValue(newValue);
|
||||
|
||||
QPalette pal = button->palette();
|
||||
QColor color;
|
||||
|
@ -101,10 +99,12 @@ QLayout *AppearancePage::createThemeColorChanger()
|
|||
button->setAutoFillBackground(true);
|
||||
button->setPalette(pal);
|
||||
button->update();
|
||||
};
|
||||
|
||||
// TODO(pajlada): re-implement
|
||||
// this->windowManager.updateAll();
|
||||
});
|
||||
// SIGNALS
|
||||
QObject::connect(slider, &QSlider::valueChanged, this, setButtonColor);
|
||||
|
||||
setButtonColor(themeHue * 100);
|
||||
|
||||
return layout;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue