improved user popup

This commit is contained in:
fourtf
2018-06-19 18:55:45 +02:00
parent 73a067f42f
commit 78b20776a8
7 changed files with 72 additions and 10 deletions
+6 -1
View File
@@ -563,7 +563,8 @@ messages::MessageElement::Flags ChannelView::getFlags() const
bool ChannelView::isPaused()
{
return this->pausedTemporarily_ || this->pausedBySelection_ || this->pausedByScrollingUp_;
return false;
// return this->pausedTemporarily_ || this->pausedBySelection_ || this->pausedByScrollingUp_;
}
void ChannelView::updatePauseStatus()
@@ -659,6 +660,10 @@ void ChannelView::drawMessages(QPainter &painter)
void ChannelView::wheelEvent(QWheelEvent *event)
{
if (event->orientation() != Qt::Vertical) {
return;
}
this->pausedBySelection_ = false;
this->pausedTemporarily_ = false;
this->updatePauseStatus();
+21
View File
@@ -22,5 +22,26 @@ RippleEffectLabel::RippleEffectLabel(BaseWidget *parent, int spacing)
this->hbox.addSpacing(spacing);
}
RippleEffectLabel2::RippleEffectLabel2(BaseWidget *parent, int padding)
: RippleEffectButton(parent)
, label_(this)
{
auto *hbox = new QHBoxLayout(this);
this->setLayout(hbox);
// this->label_.setAlignment(Qt::AlignCenter);
this->label_.setCentered(true);
hbox->setMargin(0);
// hbox.addSpacing(spacing);
hbox->addWidget(&this->label_);
// hbox.addSpacing(spacing);
}
Label &RippleEffectLabel2::getLabel()
{
return this->label_;
}
} // namespace widgets
} // namespace chatterino
+12
View File
@@ -3,6 +3,7 @@
#include "widgets/basewidget.hpp"
#include "widgets/helper/rippleeffectbutton.hpp"
#include "widgets/helper/signallabel.hpp"
#include "widgets/label.hpp"
#include <QHBoxLayout>
#include <QLabel>
@@ -27,5 +28,16 @@ private:
SignalLabel label;
};
class RippleEffectLabel2 : public RippleEffectButton
{
public:
explicit RippleEffectLabel2(BaseWidget *parent = nullptr, int padding = 6);
Label &getLabel();
private:
Label label_;
};
} // namespace widgets
} // namespace chatterino