open settings when right clicking moderation button
This commit is contained in:
@@ -230,33 +230,27 @@ void Button::mousePressEvent(QMouseEvent *event)
|
||||
void Button::mouseReleaseEvent(QMouseEvent *event)
|
||||
{
|
||||
if (!this->enabled_)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (event->button() != Qt::LeftButton)
|
||||
if (event->button() == Qt::LeftButton)
|
||||
{
|
||||
return;
|
||||
this->mouseDown_ = false;
|
||||
|
||||
if (this->rect().contains(event->pos()))
|
||||
emit leftClicked();
|
||||
}
|
||||
|
||||
this->mouseDown_ = false;
|
||||
|
||||
if (this->rect().contains(event->pos()))
|
||||
{
|
||||
emit clicked();
|
||||
}
|
||||
emit clicked(event->button());
|
||||
}
|
||||
|
||||
void Button::mouseMoveEvent(QMouseEvent *event)
|
||||
{
|
||||
if (!this->enabled_)
|
||||
if (this->enabled_)
|
||||
{
|
||||
return;
|
||||
this->mousePos_ = event->pos();
|
||||
|
||||
this->update();
|
||||
}
|
||||
|
||||
this->mousePos_ = event->pos();
|
||||
|
||||
this->update();
|
||||
}
|
||||
|
||||
void Button::onMouseEffectTimeout()
|
||||
|
||||
@@ -50,7 +50,8 @@ public:
|
||||
void setMenu(std::unique_ptr<QMenu> menu);
|
||||
|
||||
signals:
|
||||
void clicked();
|
||||
void leftClicked();
|
||||
void clicked(Qt::MouseButton button);
|
||||
void leftMousePress();
|
||||
|
||||
protected:
|
||||
|
||||
@@ -139,7 +139,7 @@ void ChannelView::initializeLayout()
|
||||
this->goToBottom_->getLabel().setText("More messages below");
|
||||
this->goToBottom_->setVisible(false);
|
||||
|
||||
QObject::connect(this->goToBottom_, &EffectLabel::clicked, this, [=] {
|
||||
QObject::connect(this->goToBottom_, &EffectLabel::leftClicked, this, [=] {
|
||||
QTimer::singleShot(180, [=] {
|
||||
this->scrollBar_->scrollToBottom(
|
||||
getSettings()->enableSmoothScrollingNewMessages.getValue());
|
||||
|
||||
@@ -150,7 +150,7 @@ void NotebookButton::mouseReleaseEvent(QMouseEvent *event)
|
||||
|
||||
update();
|
||||
|
||||
emit clicked();
|
||||
emit leftClicked();
|
||||
}
|
||||
|
||||
Button::mouseReleaseEvent(event);
|
||||
|
||||
@@ -32,7 +32,7 @@ protected:
|
||||
virtual void showEvent(QShowEvent *) override;
|
||||
|
||||
signals:
|
||||
void clicked();
|
||||
void leftClicked();
|
||||
|
||||
private:
|
||||
Notebook *parent_ = nullptr;
|
||||
|
||||
Reference in New Issue
Block a user