mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
added background color to the accountswitchwidget
This commit is contained in:
parent
1fe7e652b1
commit
e1ff4c818e
|
@ -29,10 +29,10 @@ bool Message::hasFlags(MessageFlags _flags) const
|
|||
return this->flags & _flags;
|
||||
}
|
||||
|
||||
void Message::setFlags(MessageFlags _flags)
|
||||
{
|
||||
this->flags = flags;
|
||||
}
|
||||
// void Message::setFlags(MessageFlags _flags)
|
||||
//{
|
||||
// this->flags = flags;
|
||||
//}
|
||||
|
||||
void Message::addFlags(MessageFlags _flags)
|
||||
{
|
||||
|
@ -77,7 +77,7 @@ const QString &Message::getSearchText() const
|
|||
|
||||
// _content += word.getCopyText();
|
||||
// first = false;
|
||||
// }
|
||||
// }
|
||||
|
||||
// this->searchText = _content;
|
||||
// }
|
||||
|
|
|
@ -39,7 +39,7 @@ public:
|
|||
// Message flags
|
||||
MessageFlags getFlags() const;
|
||||
bool hasFlags(MessageFlags flags) const;
|
||||
void setFlags(MessageFlags flags);
|
||||
// void setFlags(MessageFlags flags);
|
||||
void addFlags(MessageFlags flags);
|
||||
void removeFlags(MessageFlags flags);
|
||||
|
||||
|
|
|
@ -113,7 +113,7 @@ void IrcMessageHandler::handleClearChatMessage(Communi::IrcMessage *message)
|
|||
// disable the messages from the user
|
||||
for (int i = 0; i < snapshotLength; i++) {
|
||||
if (!snapshot[i]->hasFlags(Message::Timeout) && snapshot[i]->loginName == username) {
|
||||
snapshot[i]->setFlags(Message::Disabled);
|
||||
snapshot[i]->addFlags(Message::Disabled);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -191,6 +191,6 @@ void IrcMessageHandler::handleWriteConnectionNoticeMessage(Communi::IrcNoticeMes
|
|||
|
||||
this->handleNoticeMessage(message);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} // namespace helper
|
||||
} // namespace singletons
|
||||
} // namespace chatterino
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
#include <QHBoxLayout>
|
||||
#include <QLayout>
|
||||
#include <QPainter>
|
||||
#include <QPushButton>
|
||||
#include <QVBoxLayout>
|
||||
|
||||
|
@ -47,5 +48,11 @@ void AccountSwitchPopupWidget::focusOutEvent(QFocusEvent *)
|
|||
this->hide();
|
||||
}
|
||||
|
||||
void AccountSwitchPopupWidget::paintEvent(QPaintEvent *event)
|
||||
{
|
||||
QPainter painter(this);
|
||||
|
||||
painter.fillRect(this->rect(), QColor(255, 255, 255));
|
||||
}
|
||||
} // namespace widgets
|
||||
} // namespace chatterino
|
||||
|
|
|
@ -18,6 +18,7 @@ public:
|
|||
|
||||
protected:
|
||||
virtual void focusOutEvent(QFocusEvent *event) override final;
|
||||
virtual void paintEvent(QPaintEvent *event) override;
|
||||
|
||||
private:
|
||||
struct {
|
||||
|
|
|
@ -93,7 +93,7 @@ void EmotePopup::loadEmojis()
|
|||
// emojis
|
||||
messages::MessageBuilder builder;
|
||||
builder.getMessage()->addFlags(Message::Centered);
|
||||
builder.getMessage()->setFlags(Message::DisableCompactEmotes);
|
||||
builder.getMessage()->addFlags(Message::DisableCompactEmotes);
|
||||
|
||||
emojis.each([this, &builder](const QString &key, const util::EmoteData &value) {
|
||||
builder.appendElement((new EmoteElement(value, MessageElement::Flags::AlwaysShow)) //
|
||||
|
|
Loading…
Reference in a new issue