refactored the managers

This commit is contained in:
2017-12-31 00:50:07 +01:00
parent 258288bad9
commit bfa2f1637e
80 changed files with 1023 additions and 964 deletions
+7 -7
View File
@@ -1,6 +1,6 @@
#include "widgets/basewidget.hpp"
#include "colorscheme.hpp"
#include "settingsmanager.hpp"
#include "singletons/settingsmanager.hpp"
#include "singletons/thememanager.hpp"
#include "widgets/tooltipwidget.hpp"
#include <QDebug>
@@ -12,23 +12,23 @@
namespace chatterino {
namespace widgets {
BaseWidget::BaseWidget(ColorScheme &_colorScheme, QWidget *parent)
BaseWidget::BaseWidget(ThemeManager &_themeManager, QWidget *parent)
: QWidget(parent)
, colorScheme(_colorScheme)
, themeManager(_themeManager)
{
this->init();
}
BaseWidget::BaseWidget(BaseWidget *parent)
: QWidget(parent)
, colorScheme(*ColorScheme::instance)
, themeManager(ThemeManager::getInstance())
{
this->init();
}
BaseWidget::BaseWidget(QWidget *parent)
: QWidget(parent)
, colorScheme(*ColorScheme::instance)
, themeManager(ThemeManager::getInstance())
{
}
@@ -49,7 +49,7 @@ float BaseWidget::getDpiMultiplier()
void BaseWidget::init()
{
auto connection = this->colorScheme.updated.connect([this]() {
auto connection = this->themeManager.updated.connect([this]() {
this->refreshTheme();
this->update();