diff --git a/channel.cpp b/channel.cpp index 68213072d..8770b1da7 100644 --- a/channel.cpp +++ b/channel.cpp @@ -1,14 +1,10 @@ #include "channel.h" #include "message.h" +#include "windows.h" #include -Channel Channel::whispers(QString("/whispers")); -Channel Channel::mentions(QString("/mentions")); - -QMap Channel::channels = QMap(); - -Channel::Channel(QString channel) +Channel::Channel(const QString &channel) : m_messages() , m_name((channel.length() > 0 && channel[0] == '#') ? channel.mid(1) : channel) @@ -22,59 +18,6 @@ Channel::Channel(QString channel) { } -Channel * -Channel::addChannel(const QString &channel) -{ - auto c = getChannel(channel); - - if (c == NULL) { - c = new Channel(channel); - channels.insert(channel, c); - - return c; - } - - c->m_referenceCount++; - - return c; -} - -Channel * -Channel::getChannel(const QString &channel) -{ - if (channel == "/whispers") { - return const_cast(&whispers); - } - - if (channel == "/mentions") { - return const_cast(&mentions); - } - - auto a = channels.find(channel); - - if (a == channels.end()) { - return NULL; - } - - return a.value(); -} - -void -Channel::removeChannel(const QString &channel) -{ - auto c = getChannel(channel); - - if (c == NULL) - return; - - c->m_referenceCount--; - - if (c->m_referenceCount == 0) { - channels.remove(channel); - delete c; - } -} - QVector> Channel::getMessagesClone() { @@ -91,4 +34,6 @@ Channel::addMessage(std::shared_ptr message) m_messageMutex.lock(); m_messages.append(message); m_messageMutex.unlock(); + + Windows::repaintVisibleChatWidgets(); } diff --git a/channel.h b/channel.h index a8ea9e974..a9534cfae 100644 --- a/channel.h +++ b/channel.h @@ -14,22 +14,9 @@ class Message; class Channel { - // static - public: - static Channel whispers; - static Channel mentions; + Channel(const QString &channel); - static Channel *addChannel(const QString &channel); - static Channel *getChannel(const QString &channel); - static void removeChannel(const QString &channel); - -private: - static QMap channels; - - // members - -public: // properties const ConcurrentMap & bttvChannelEmotes() const @@ -102,10 +89,6 @@ public: QVector> getMessagesClone(); private: - Channel(QString channel); - - int m_referenceCount = 0; - QVector> m_messages; QString m_name; diff --git a/channels.cpp b/channels.cpp new file mode 100644 index 000000000..93ad24ae5 --- /dev/null +++ b/channels.cpp @@ -0,0 +1,58 @@ +#include "channels.h" + +Channel Channels::m_whispers(QString("/whispers")); +Channel Channels::m_mentions(QString("/mentions")); + +QMap> Channels::m_channels; + +Channel * +Channels::addChannel(const QString &channel) +{ + auto c = getChannel(channel); + + if (c == NULL) { + c = new Channel(channel); + m_channels.insert(channel, std::tuple(c, 1)); + + return c; + } + + return c; +} + +Channel * +Channels::getChannel(const QString &channel) +{ + if (channel == "/whispers") { + return &m_whispers; + } + + if (channel == "/mentions") { + return &m_mentions; + } + + auto a = m_channels.find(channel); + + if (a == m_channels.end()) { + return NULL; + } + + return std::get<0>(a.value()); +} + +void +Channels::removeChannel(const QString &channel) +{ + auto a = m_channels.find(channel); + + if (a == m_channels.end()) { + return; + } + + std::get<1>(a.value())--; + + if (std::get<1>(a.value()) == 0) { + m_channels.remove(channel); + delete std::get<0>(a.value()); + } +} diff --git a/channels.h b/channels.h new file mode 100644 index 000000000..c39231ea5 --- /dev/null +++ b/channels.h @@ -0,0 +1,36 @@ +#ifndef CHANNELS_H +#define CHANNELS_H + +#include "channel.h" + +class Channels +{ +public: + static Channel * + whispers() + { + return &m_whispers; + } + + static Channel * + mentions() + { + return &m_whispers; + } + + static Channel *addChannel(const QString &channel); + static Channel *getChannel(const QString &channel); + static void removeChannel(const QString &channel); + +private: + Channels() + { + } + + static Channel m_whispers; + static Channel m_mentions; + + static QMap> m_channels; +}; + +#endif // CHANNELS_H diff --git a/chatterino.pro b/chatterino.pro index 4fd0e6377..652146ca0 100644 --- a/chatterino.pro +++ b/chatterino.pro @@ -66,7 +66,8 @@ SOURCES += main.cpp\ resources.cpp \ windows.cpp \ chatwidgetheaderbutton.cpp \ - chatwidgetheaderbuttonlabel.cpp + chatwidgetheaderbuttonlabel.cpp \ + channels.cpp HEADERS += mainwindow.h \ chatwidget.h \ @@ -104,7 +105,8 @@ HEADERS += mainwindow.h \ resources.h \ windows.h \ chatwidgetheaderbutton.h \ - chatwidgetheaderbuttonlabel.h + chatwidgetheaderbuttonlabel.h \ + channels.h PRECOMPILED_HEADER = diff --git a/chatwidget.cpp b/chatwidget.cpp index 2fabf5c19..9cdea969f 100644 --- a/chatwidget.cpp +++ b/chatwidget.cpp @@ -7,14 +7,14 @@ ChatWidget::ChatWidget(QWidget *parent) : QWidget(parent) - , vbox(this) + , m_vbox(this) { - vbox.setSpacing(0); - vbox.setMargin(1); + m_vbox.setSpacing(0); + m_vbox.setMargin(1); - vbox.addWidget(&header); - vbox.addWidget(&view); - vbox.addWidget(&input); + m_vbox.addWidget(&m_header); + m_vbox.addWidget(&m_view); + m_vbox.addWidget(&m_input); } ChatWidget::~ChatWidget() diff --git a/chatwidget.h b/chatwidget.h index 71a96ce71..bd6378ce8 100644 --- a/chatwidget.h +++ b/chatwidget.h @@ -17,17 +17,23 @@ public: ChatWidget(QWidget *parent = 0); ~ChatWidget(); + ChatWidgetView & + view() + { + return m_view; + } + protected: void paintEvent(QPaintEvent *) Q_DECL_OVERRIDE; private: - QFont font; - QVBoxLayout vbox; - ChatWidgetHeader header; - ChatWidgetView view; - ChatWidgetInput input; + QFont m_font; + QVBoxLayout m_vbox; + ChatWidgetHeader m_header; + ChatWidgetView m_view; + ChatWidgetInput m_input; - Channel *channel = NULL; + Channel *m_channel = NULL; }; #endif // CHATWIDGET_H diff --git a/chatwidgetview.cpp b/chatwidgetview.cpp index 3a65a5113..d01177a82 100644 --- a/chatwidgetview.cpp +++ b/chatwidgetview.cpp @@ -1,4 +1,5 @@ #include "chatwidgetview.h" +#include "channels.h" #include "message.h" #include "word.h" #include "wordpart.h" @@ -15,7 +16,26 @@ ChatWidgetView::ChatWidgetView() scroll->scrollTo(QPointF(0, 100)); - m_channel = Channel::getChannel("fourtf"); + m_channel = Channels::getChannel("fourtf"); +} + +bool +ChatWidgetView::layoutMessages() +{ + auto c = channel(); + + if (c == NULL) + return false; + + auto messages = c->getMessagesClone(); + + bool redraw = false; + + for (std::shared_ptr &message : messages) { + redraw |= message.get()->layout(this->width(), true); + } + + return redraw; } void @@ -24,17 +44,7 @@ ChatWidgetView::resizeEvent(QResizeEvent *) scrollbar.resize(scrollbar.width(), height()); scrollbar.move(width() - scrollbar.width(), 0); - auto c = channel(); - - if (c == NULL) - return; - - auto messages = c->getMessagesClone(); - - for (std::shared_ptr &message : messages) { - qInfo(QString::number(width()).toStdString().c_str()); - message.get()->layout(this->width(), true); - } + layoutMessages(); } void diff --git a/chatwidgetview.h b/chatwidgetview.h index 7cc536de3..7511d56a4 100644 --- a/chatwidgetview.h +++ b/chatwidgetview.h @@ -19,6 +19,8 @@ public: return m_channel; } + bool layoutMessages(); + protected: void resizeEvent(QResizeEvent *); diff --git a/ircmanager.cpp b/ircmanager.cpp index 3ad2b5cee..805bcdb73 100644 --- a/ircmanager.cpp +++ b/ircmanager.cpp @@ -1,14 +1,16 @@ #include "ircmanager.h" -#include "QJsonArray" -#include "QJsonDocument" -#include "QJsonObject" -#include "QNetworkReply" #include "asyncexec.h" #include "channel.h" -#include "future" -#include "irccommand.h" -#include "ircconnection.h" -#include "qnetworkrequest.h" +#include "channels.h" + +#include +#include +#include +#include +#include +#include +#include +#include Account *IrcManager::account = nullptr; IrcConnection *IrcManager::connection = NULL; @@ -166,7 +168,7 @@ IrcManager::privateMessageReceived(IrcPrivateMessage *message) qInfo(message->content().toStdString().c_str()); qInfo(message->target().toStdString().c_str()); - auto c = Channel::getChannel(message->target().mid(1)); + auto c = Channels::getChannel(message->target().mid(1)); if (c != NULL) { c->addMessage(std::shared_ptr(new Message(*message, *c))); @@ -209,8 +211,8 @@ IrcManager::tryAddIgnoredUser(QString const &username, QString &errorMessage) return true; } - errorMessage = "Error while ignoring user \"" + username + "\": " + - reply->errorString(); + errorMessage = "Error while ignoring user \"" + username + + "\": " + reply->errorString(); return false; } @@ -243,8 +245,8 @@ IrcManager::tryRemoveIgnoredUser(QString const &username, QString &errorMessage) return true; } - errorMessage = "Error while unignoring user \"" + username + "\": " + - reply->errorString(); + errorMessage = "Error while unignoring user \"" + username + + "\": " + reply->errorString(); return false; } diff --git a/ircmanager.h b/ircmanager.h index ca5060b32..e790c4f20 100644 --- a/ircmanager.h +++ b/ircmanager.h @@ -3,13 +3,14 @@ #define TWITCH_MAX_MESSAGELENGTH 500 -#include "IrcMessage" -#include "QMap" -#include "QMutex" -#include "QString" #include "account.h" #include "message.h" -#include "qnetworkaccessmanager.h" + +#include +#include +#include +#include +#include class IrcManager { diff --git a/lazyloadedimage.cpp b/lazyloadedimage.cpp index c6d8c3961..d94e1cec1 100644 --- a/lazyloadedimage.cpp +++ b/lazyloadedimage.cpp @@ -3,6 +3,7 @@ #include "asyncexec.h" #include "emotes.h" #include "ircmanager.h" +#include "windows.h" #include #include @@ -58,6 +59,7 @@ LazyLoadedImage::loadImage() m_pixmap = pixmap; Emotes::incGeneration(); + Windows::layoutVisibleChatWidgets(); }); //})); } diff --git a/main.cpp b/main.cpp index 1d0baf451..3daf59b27 100644 --- a/main.cpp +++ b/main.cpp @@ -1,3 +1,4 @@ +#include "channels.h" #include "colorscheme.h" #include "emojis.h" #include "ircmanager.h" @@ -21,8 +22,8 @@ main(int argc, char *argv[]) MainWindow &w = Windows::mainWindow(); w.show(); - Channel::addChannel("ian678"); - Channel::addChannel("fourtf"); + Channels::addChannel("ian678"); + Channels::addChannel("fourtf"); IrcManager::connect(); diff --git a/mainwindow.cpp b/mainwindow.cpp index b8ea768c0..506c3efdc 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -25,3 +25,42 @@ MainWindow::MainWindow(QWidget *parent) MainWindow::~MainWindow() { } + +void +MainWindow::layoutVisibleChatWidgets() +{ + auto *page = notebook.selected(); + + if (page == NULL) { + return; + } + + const std::vector &widgets = page->chatWidgets(); + + for (auto it = widgets.begin(); it != widgets.end(); ++it) { + ChatWidget *widget = *it; + + if (widget->view().layoutMessages()) { + widget->repaint(); + } + } +} + +void +MainWindow::repaintVisibleChatWidgets() +{ + auto *page = notebook.selected(); + + if (page == NULL) { + return; + } + + const std::vector &widgets = page->chatWidgets(); + + for (auto it = widgets.begin(); it != widgets.end(); ++it) { + ChatWidget *widget = *it; + + widget->view().layoutMessages(); + widget->repaint(); + } +} diff --git a/mainwindow.h b/mainwindow.h index 640e78004..d57489619 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -12,6 +12,9 @@ public: explicit MainWindow(QWidget *parent = 0); ~MainWindow(); Notebook notebook; + + void layoutVisibleChatWidgets(); + void repaintVisibleChatWidgets(); }; #endif // MAINWINDOW_H diff --git a/notebook.cpp b/notebook.cpp index 42199c293..523713823 100644 --- a/notebook.cpp +++ b/notebook.cpp @@ -12,19 +12,19 @@ Notebook::Notebook(QWidget *parent) : QWidget(parent) - , addButton(this) - , settingsButton(this) - , userButton(this) + , m_addButton(this) + , m_settingsButton(this) + , m_userButton(this) { - connect(&settingsButton, SIGNAL(clicked()), this, + connect(&m_settingsButton, SIGNAL(clicked()), this, SLOT(settingsButtonClicked())); - settingsButton.resize(24, 24); - settingsButton.icon = NotebookButton::IconSettings; - userButton.resize(24, 24); - userButton.move(24, 0); - userButton.icon = NotebookButton::IconUser; - addButton.resize(24, 24); + m_settingsButton.resize(24, 24); + m_settingsButton.icon = NotebookButton::IconSettings; + m_userButton.resize(24, 24); + m_userButton.move(24, 0); + m_userButton.icon = NotebookButton::IconUser; + m_addButton.resize(24, 24); } void @@ -41,11 +41,11 @@ Notebook::addPage() auto tab = new NotebookTab(this); auto page = new NotebookPage(this, tab); - if (pages.count() == 0) { + if (m_pages.count() == 0) { select(page); } - this->pages.append(page); + this->m_pages.append(page); return page; } @@ -53,7 +53,7 @@ Notebook::addPage() void Notebook::select(NotebookPage *page) { - if (page == selected) + if (page == m_selected) return; if (page != nullptr) { @@ -61,12 +61,12 @@ Notebook::select(NotebookPage *page) page->tab->setSelected(true); } - if (selected != nullptr) { - selected->setHidden(true); - selected->tab->setSelected(false); + if (m_selected != nullptr) { + m_selected->setHidden(true); + m_selected->tab->setSelected(false); } - selected = page; + m_selected = page; performLayout(); } @@ -78,11 +78,11 @@ Notebook::performLayout() int tabHeight = 16; bool first = true; - for (auto &i : pages) { + for (auto &i : m_pages) { tabHeight = i->tab->height(); if (!first && - (i == pages.last() ? tabHeight : 0) + x + i->tab->width() > + (i == m_pages.last() ? tabHeight : 0) + x + i->tab->width() > width()) { y += i->tab->height(); i->tab->move(0, y); @@ -95,11 +95,11 @@ Notebook::performLayout() first = false; } - this->addButton.move(x, y); + this->m_addButton.move(x, y); - if (selected != nullptr) { - selected->move(0, y + tabHeight); - selected->resize(width(), height() - y - tabHeight); + if (m_selected != nullptr) { + m_selected->move(0, y + tabHeight); + m_selected->resize(width(), height() - y - tabHeight); } } diff --git a/notebook.h b/notebook.h index 4724dc6f9..c11d1c35e 100644 --- a/notebook.h +++ b/notebook.h @@ -19,6 +19,13 @@ public: enum HighlightType { none, highlighted, newMessage }; void select(NotebookPage *page); + + NotebookPage * + selected() + { + return m_selected; + } + void performLayout(); protected: @@ -30,13 +37,13 @@ public slots: void settingsButtonClicked(); private: - QList pages; + QList m_pages; - NotebookButton addButton; - NotebookButton settingsButton; - NotebookButton userButton; + NotebookButton m_addButton; + NotebookButton m_settingsButton; + NotebookButton m_userButton; - NotebookPage *selected = nullptr; + NotebookPage *m_selected = nullptr; }; #endif // NOTEBOOK_H diff --git a/notebookpage.cpp b/notebookpage.cpp index eb0152cae..be903871e 100644 --- a/notebookpage.cpp +++ b/notebookpage.cpp @@ -14,8 +14,9 @@ std::pair NotebookPage::dropPosition = std::pair(-1, -1); NotebookPage::NotebookPage(QWidget *parent, NotebookTab *tab) : QWidget(parent) - , parentbox(this) - , preview(this) + , m_parentbox(this) + , m_preview(this) + , m_chatWidgets() { this->tab = tab; tab->page = this; @@ -23,19 +24,27 @@ NotebookPage::NotebookPage(QWidget *parent, NotebookTab *tab) setHidden(true); setAcceptDrops(true); - parentbox.addSpacing(2); - parentbox.addLayout(&hbox); - parentbox.setMargin(0); + m_parentbox.addSpacing(2); + m_parentbox.addLayout(&m_hbox); + m_parentbox.setMargin(0); - hbox.setSpacing(1); - hbox.setMargin(0); + m_hbox.setSpacing(1); + m_hbox.setMargin(0); } std::pair NotebookPage::removeFromLayout(ChatWidget *widget) { - for (int i = 0; i < hbox.count(); ++i) { - auto vbox = static_cast(hbox.itemAt(i)); + for (auto it = m_chatWidgets.begin(); it != m_chatWidgets.end(); ++it) { + if (*it == widget) { + m_chatWidgets.erase(it); + + break; + } + } + + for (int i = 0; i < m_hbox.count(); ++i) { + auto vbox = static_cast(m_hbox.itemAt(i)); for (int j = 0; j < vbox->count(); ++j) { if (vbox->itemAt(j)->widget() != widget) @@ -46,13 +55,12 @@ NotebookPage::removeFromLayout(ChatWidget *widget) bool isLastItem = vbox->count() == 0; if (isLastItem) { - hbox.removeItem(vbox); + m_hbox.removeItem(vbox); delete vbox; } return std::pair(i, isLastItem ? -1 : j); - ; } } @@ -64,12 +72,14 @@ NotebookPage::addToLayout( ChatWidget *widget, std::pair position = std::pair(-1, -1)) { + m_chatWidgets.push_back(widget); + // add vbox at the end - if (position.first < 0 || position.first >= hbox.count()) { + if (position.first < 0 || position.first >= m_hbox.count()) { auto vbox = new QVBoxLayout(); vbox->addWidget(widget); - hbox.addLayout(vbox); + m_hbox.addLayout(vbox); return; } @@ -78,12 +88,12 @@ NotebookPage::addToLayout( auto vbox = new QVBoxLayout(); vbox->addWidget(widget); - hbox.insertLayout(position.first, vbox); + m_hbox.insertLayout(position.first, vbox); return; } // add to existing vbox - auto vbox = static_cast(hbox.itemAt(position.first)); + auto vbox = static_cast(m_hbox.itemAt(position.first)); vbox->insertWidget(std::max(0, std::min(vbox->count(), position.second)), widget); @@ -92,7 +102,7 @@ NotebookPage::addToLayout( void NotebookPage::enterEvent(QEvent *) { - if (hbox.count() == 0) { + if (m_hbox.count() == 0) { setCursor(QCursor(Qt::PointingHandCursor)); } else { setCursor(QCursor(Qt::ArrowCursor)); @@ -107,8 +117,9 @@ NotebookPage::leaveEvent(QEvent *) void NotebookPage::mouseReleaseEvent(QMouseEvent *event) { - if (hbox.count() == 0 && event->button() == Qt::LeftButton) { + if (m_hbox.count() == 0 && event->button() == Qt::LeftButton) { addToLayout(new ChatWidget(), std::pair(-1, -1)); + setCursor(QCursor(Qt::ArrowCursor)); } } @@ -120,27 +131,28 @@ NotebookPage::dragEnterEvent(QDragEnterEvent *event) return; if (isDraggingSplit) { - dropRegions.clear(); + m_dropRegions.clear(); - if (hbox.count() == 0) { - dropRegions.push_back( + if (m_hbox.count() == 0) { + m_dropRegions.push_back( DropRegion(rect(), std::pair(-1, -1))); } else { - for (int i = 0; i < hbox.count() + 1; ++i) { - dropRegions.push_back( - DropRegion(QRect(((i * 4 - 1) * width() / hbox.count()) / 4, - 0, width() / hbox.count() / 2, height()), - std::pair(i, -1))); + for (int i = 0; i < m_hbox.count() + 1; ++i) { + m_dropRegions.push_back(DropRegion( + QRect(((i * 4 - 1) * width() / m_hbox.count()) / 4, 0, + width() / m_hbox.count() / 2, height()), + std::pair(i, -1))); } - for (int i = 0; i < hbox.count(); ++i) { - auto vbox = static_cast(hbox.itemAt(i)); + for (int i = 0; i < m_hbox.count(); ++i) { + auto vbox = static_cast(m_hbox.itemAt(i)); for (int j = 0; j < vbox->count() + 1; ++j) { - dropRegions.push_back(DropRegion( - QRect(i * width() / hbox.count(), + m_dropRegions.push_back(DropRegion( + QRect(i * width() / m_hbox.count(), ((j * 2 - 1) * height() / vbox->count()) / 2, - width() / hbox.count(), height() / vbox->count()), + width() / m_hbox.count(), + height() / vbox->count()), std::pair(i, j))); } } @@ -161,18 +173,18 @@ NotebookPage::dragMoveEvent(QDragMoveEvent *event) void NotebookPage::setPreviewRect(QPoint mousePos) { - for (DropRegion region : dropRegions) { + for (DropRegion region : m_dropRegions) { if (region.rect.contains(mousePos)) { - preview.move(region.rect.x(), region.rect.y()); - preview.resize(region.rect.width(), region.rect.height()); - preview.show(); - preview.raise(); + m_preview.move(region.rect.x(), region.rect.y()); + m_preview.resize(region.rect.width(), region.rect.height()); + m_preview.show(); + m_preview.raise(); dropPosition = region.position; return; } else { - preview.hide(); + m_preview.hide(); } } } @@ -180,7 +192,7 @@ NotebookPage::setPreviewRect(QPoint mousePos) void NotebookPage::dragLeaveEvent(QDragLeaveEvent *event) { - preview.hide(); + m_preview.hide(); } void @@ -194,7 +206,7 @@ NotebookPage::dropEvent(QDropEvent *event) addToLayout(NotebookPage::draggingSplit, dropPosition); } - preview.hide(); + m_preview.hide(); } void @@ -202,7 +214,7 @@ NotebookPage::paintEvent(QPaintEvent *) { QPainter painter(this); - if (hbox.count() == 0) { + if (m_hbox.count() == 0) { painter.fillRect(rect(), ColorScheme::instance().ChatBackground); painter.fillRect(0, 0, width(), 2, diff --git a/notebookpage.h b/notebookpage.h index 76110eb2d..acdd0a573 100644 --- a/notebookpage.h +++ b/notebookpage.h @@ -19,12 +19,16 @@ class NotebookPage : public QWidget public: NotebookPage(QWidget *parent, NotebookTab *tab); NotebookTab *tab; - QVBoxLayout parentbox; - QHBoxLayout hbox; std::pair removeFromLayout(ChatWidget *widget); void addToLayout(ChatWidget *widget, std::pair position); + const std::vector & + chatWidgets() const + { + return m_chatWidgets; + } + static bool isDraggingSplit; static ChatWidget *draggingSplit; static std::pair dropPosition; @@ -52,9 +56,13 @@ protected: } }; - std::vector dropRegions; + QVBoxLayout m_parentbox; + QHBoxLayout m_hbox; - NotebookPageDropPreview preview; + std::vector m_chatWidgets; + std::vector m_dropRegions; + + NotebookPageDropPreview m_preview; private: void setPreviewRect(QPoint mousePos); diff --git a/windows.cpp b/windows.cpp index b2b4ad7ae..3ab0045e2 100644 --- a/windows.cpp +++ b/windows.cpp @@ -5,6 +5,13 @@ QMutex Windows::m_windowMutex; MainWindow *Windows::m_mainWindow(NULL); void -Windows::invalidateEmotes() +Windows::layoutVisibleChatWidgets() { + m_mainWindow->layoutVisibleChatWidgets(); +} + +void +Windows::repaintVisibleChatWidgets() +{ + m_mainWindow->repaintVisibleChatWidgets(); } diff --git a/windows.h b/windows.h index 0dd022262..79bf3efa5 100644 --- a/windows.h +++ b/windows.h @@ -8,7 +8,8 @@ class Windows { public: - static void invalidateEmotes(); + static void layoutVisibleChatWidgets(); + static void repaintVisibleChatWidgets(); static MainWindow & mainWindow()