2017-06-26 16:41:20 +02:00
|
|
|
#pragma once
|
2017-06-26 15:53:43 +02:00
|
|
|
|
2017-06-26 16:41:20 +02:00
|
|
|
#include <QWidget>
|
|
|
|
|
|
|
|
namespace chatterino {
|
2017-12-31 22:58:35 +01:00
|
|
|
namespace singletons {
|
2017-12-31 00:50:07 +01:00
|
|
|
class ThemeManager;
|
2017-12-31 22:58:35 +01:00
|
|
|
}
|
2017-06-26 16:41:20 +02:00
|
|
|
|
|
|
|
namespace widgets {
|
|
|
|
|
|
|
|
class BaseWidget : public QWidget
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2018-01-15 01:35:35 +01:00
|
|
|
explicit BaseWidget(singletons::ThemeManager &_themeManager, QWidget *parent,
|
|
|
|
Qt::WindowFlags f = Qt::WindowFlags());
|
|
|
|
explicit BaseWidget(BaseWidget *parent, Qt::WindowFlags f = Qt::WindowFlags());
|
|
|
|
explicit BaseWidget(QWidget *parent = nullptr, Qt::WindowFlags f = Qt::WindowFlags());
|
2017-12-17 16:45:15 +01:00
|
|
|
|
2017-12-31 22:58:35 +01:00
|
|
|
singletons::ThemeManager &themeManager;
|
2017-07-02 14:28:37 +02:00
|
|
|
|
2017-09-22 00:50:43 +02:00
|
|
|
float getDpiMultiplier();
|
|
|
|
|
|
|
|
protected:
|
2017-12-22 15:13:42 +01:00
|
|
|
virtual void dpiMultiplierChanged(float /*oldDpi*/, float /*newDpi*/)
|
2017-12-18 00:54:17 +01:00
|
|
|
{
|
|
|
|
}
|
2017-09-22 00:50:43 +02:00
|
|
|
|
|
|
|
float dpiMultiplier = 1.f;
|
|
|
|
|
2018-01-14 21:55:36 +01:00
|
|
|
private:
|
2017-07-02 14:28:37 +02:00
|
|
|
void init();
|
|
|
|
|
|
|
|
virtual void refreshTheme();
|
2017-06-26 16:41:20 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace widgets
|
|
|
|
} // namespace chatterino
|