added MessageColor to represet special colors

This commit is contained in:
fourtf
2017-09-21 00:54:10 +02:00
parent 38d118c5dc
commit bd4601a5d4
12 changed files with 102 additions and 45 deletions
+1 -1
View File
@@ -470,7 +470,7 @@ void ChannelView::updateMessageBuffer(messages::MessageRef *messageRef, QPixmap
}
// text
else {
QColor color = wordPart.getWord().getColor();
QColor color = wordPart.getWord().getColor().getColor(this->colorScheme);
this->colorScheme.normalizeColor(color);
+2 -2
View File
@@ -74,8 +74,8 @@ ChatWidget::ChatWidget(ChannelManager &_channelManager, NotebookPage *parent)
// CTRL+R: Change Channel
ezShortcut(this, "CTRL+R", &ChatWidget::doChangeChannel);
// CTRL+C: Copy
ezShortcut(this, "CTRL+B", &ChatWidget::doCopy);
// CTRL+C: Copy
// ezShortcut(this, "CTRL+B", &ChatWidget::doCopy);
#ifndef NDEBUG
// F12: Toggle message spawning
+4 -10
View File
@@ -160,6 +160,10 @@ ChatWidgetInput::ChatWidgetInput(ChatWidget *_chatWidget, EmoteManager &emoteMan
notebook->previousTab();
}
} else if (event->key() == Qt::Key_C && event->modifiers() == Qt::ControlModifier) {
event->accept();
this->chatWidget->doCopy();
}
});
@@ -188,16 +192,6 @@ void ChatWidgetInput::editTextChanged()
{
}
// void
// ChatWidgetInput::editKeyPressed(QKeyEvent *event)
//{
// if (event->key() == Qt::Key_Enter) {
// event->accept();
// IrcManager::send("PRIVMSG #" + edit.toPlainText();
// edit.setText(QString());
// }
//}
void ChatWidgetInput::paintEvent(QPaintEvent *)
{
QPainter painter(this);
-1
View File
@@ -54,7 +54,6 @@ private:
private slots:
void editTextChanged();
// void editKeyPressed(QKeyEvent *event);
friend class ChatWidget;
};
+1 -1
View File
@@ -39,7 +39,7 @@ void EmotePopup::loadChannel(std::shared_ptr<Channel> _channel)
messages::MessageBuilder builder1;
builder1.appendWord(
Word(title, Word::Type::Text, QColor(255, 255, 255), QString(), QString()));
Word(title, Word::Type::Text, MessageColor(MessageColor::Text), QString(), QString()));
builder1.getMessage()->centered = true;
emoteChannel->addMessage(builder1.getMessage());