improved user popup
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user