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