diff --git a/src/widgets/helper/channelview.cpp b/src/widgets/helper/channelview.cpp index 1e974dbf9..663b7882b 100644 --- a/src/widgets/helper/channelview.cpp +++ b/src/widgets/helper/channelview.cpp @@ -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 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; } diff --git a/src/widgets/settingspages/appearancepage.cpp b/src/widgets/settingspages/appearancepage.cpp index db080d632..2bde282d7 100644 --- a/src/widgets/settingspages/appearancepage.cpp +++ b/src/widgets/settingspages/appearancepage.cpp @@ -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; }