refactored the managers
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
#include "messages/lazyloadedimage.hpp"
|
||||
#include "asyncexec.hpp"
|
||||
#include "emotemanager.hpp"
|
||||
#include "ircmanager.hpp"
|
||||
#include "singletons/emotemanager.hpp"
|
||||
#include "singletons/ircmanager.hpp"
|
||||
#include "singletons/windowmanager.hpp"
|
||||
#include "util/networkmanager.hpp"
|
||||
#include "util/urlfetch.hpp"
|
||||
#include "windowmanager.hpp"
|
||||
|
||||
#include <QBuffer>
|
||||
#include <QImageReader>
|
||||
@@ -81,7 +81,7 @@ void LazyLoadedImage::loadImage()
|
||||
|
||||
EmoteManager::getInstance().incGeneration();
|
||||
|
||||
WindowManager::instance->layoutVisibleChatWidgets();
|
||||
WindowManager::getInstance().layoutVisibleChatWidgets();
|
||||
});
|
||||
|
||||
EmoteManager::getInstance().getGifUpdateSignal().connect([=]() {
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
#include "messages/message.hpp"
|
||||
#include "channel.hpp"
|
||||
#include "colorscheme.hpp"
|
||||
#include "singletons/thememanager.hpp"
|
||||
#include "emojis.hpp"
|
||||
#include "emotemanager.hpp"
|
||||
#include "fontmanager.hpp"
|
||||
#include "ircmanager.hpp"
|
||||
#include "singletons/emotemanager.hpp"
|
||||
#include "singletons/fontmanager.hpp"
|
||||
#include "singletons/ircmanager.hpp"
|
||||
#include "messages/link.hpp"
|
||||
#include "resources.hpp"
|
||||
#include "util/irchelpers.hpp"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "messagebuilder.hpp"
|
||||
#include "colorscheme.hpp"
|
||||
#include "emotemanager.hpp"
|
||||
#include "singletons/thememanager.hpp"
|
||||
#include "singletons/emotemanager.hpp"
|
||||
#include "resources.hpp"
|
||||
|
||||
#include <QDateTime>
|
||||
|
||||
@@ -19,17 +19,17 @@ MessageColor::Type MessageColor::getType() const
|
||||
return this->type;
|
||||
}
|
||||
|
||||
const QColor &MessageColor::getColor(ColorScheme &colorScheme) const
|
||||
const QColor &MessageColor::getColor(ThemeManager &themeManager) const
|
||||
{
|
||||
switch (this->type) {
|
||||
case Type::Custom:
|
||||
return this->color;
|
||||
case Type::Text:
|
||||
return colorScheme.Text;
|
||||
return themeManager.Text;
|
||||
case Type::System:
|
||||
return colorScheme.SystemMessageColor;
|
||||
return themeManager.SystemMessageColor;
|
||||
case Type::Link:
|
||||
return colorScheme.TextLink;
|
||||
return themeManager.TextLink;
|
||||
}
|
||||
|
||||
static QColor _default;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#include <QColor>
|
||||
|
||||
#include <colorscheme.hpp>
|
||||
#include "singletons/thememanager.hpp"
|
||||
|
||||
namespace chatterino {
|
||||
namespace messages {
|
||||
@@ -16,7 +16,7 @@ public:
|
||||
explicit MessageColor(Type type = Text);
|
||||
|
||||
Type getType() const;
|
||||
const QColor &getColor(ColorScheme &colorScheme) const;
|
||||
const QColor &getColor(ThemeManager &themeManager) const;
|
||||
|
||||
private:
|
||||
Type type;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "messages/messageref.hpp"
|
||||
#include "emotemanager.hpp"
|
||||
#include "settingsmanager.hpp"
|
||||
#include "singletons/emotemanager.hpp"
|
||||
#include "singletons/settingsmanager.hpp"
|
||||
|
||||
#include <QDebug>
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#include "messages/word.hpp"
|
||||
#include "settingsmanager.hpp"
|
||||
#include "singletons/settingsmanager.hpp"
|
||||
#include "util/benchmark.hpp"
|
||||
|
||||
namespace chatterino {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include "fontmanager.hpp"
|
||||
#include "singletons/fontmanager.hpp"
|
||||
#include "messages/lazyloadedimage.hpp"
|
||||
#include "messages/link.hpp"
|
||||
#include "messages/messagecolor.hpp"
|
||||
|
||||
Reference in New Issue
Block a user