mirror of https://github.com/qTox/qTox.git
Browse Source
This allows leaf classes to update independently when the GUI has changed themes, without their parent having to call updateTheme() manually. Fix #5924 Fix #5592pull/5934/head
33 changed files with 179 additions and 94 deletions
@ -0,0 +1,21 @@
@@ -0,0 +1,21 @@
|
||||
#ifndef DIALOGSTYLE_H |
||||
#define DIALOGSTYLE_H |
||||
|
||||
#include <QDialog> |
||||
#include "src/widget/gui.h" |
||||
|
||||
class DialogStyle : public QDialog { |
||||
Q_OBJECT |
||||
|
||||
public: |
||||
DialogStyle(QWidget* parent = nullptr, Qt::WindowFlags f = Qt::WindowFlags()) : QDialog(parent, f) |
||||
{ |
||||
connect(&GUI::getInstance(), &GUI::themeReload, this, &DialogStyle::reloadTheme); |
||||
} |
||||
virtual ~DialogStyle() {} |
||||
|
||||
public slots: |
||||
virtual void reloadTheme() {} |
||||
}; |
||||
|
||||
#endif //DIALOGSTYLE_H
|
@ -0,0 +1,21 @@
@@ -0,0 +1,21 @@
|
||||
#ifndef FRAMESTYLE_H |
||||
#define FRAMESTYLE_H |
||||
|
||||
#include <QFrame> |
||||
#include "src/widget/gui.h" |
||||
|
||||
class FrameStyle : public QFrame { |
||||
Q_OBJECT |
||||
|
||||
public: |
||||
FrameStyle(QWidget* parent = nullptr) : QFrame(parent) |
||||
{ |
||||
connect(&GUI::getInstance(), &GUI::themeReload, this, &FrameStyle::reloadTheme); |
||||
} |
||||
virtual ~FrameStyle() {} |
||||
|
||||
public slots: |
||||
virtual void reloadTheme() {} |
||||
}; |
||||
|
||||
#endif //FRAMESTYLE_H
|
@ -0,0 +1,21 @@
@@ -0,0 +1,21 @@
|
||||
#ifndef WIDGETSTYLE_H |
||||
#define WIDGETSTYLE_H |
||||
|
||||
#include <QWidget> |
||||
#include "src/widget/gui.h" |
||||
|
||||
class WidgetStyle : public QWidget { |
||||
Q_OBJECT |
||||
|
||||
public: |
||||
WidgetStyle(QWidget* parent = nullptr, Qt::WindowFlags f = Qt::WindowFlags()) : QWidget(parent, f) |
||||
{ |
||||
connect(&GUI::getInstance(), &GUI::themeReload, this, &WidgetStyle::reloadTheme); |
||||
} |
||||
virtual ~WidgetStyle() {} |
||||
|
||||
public slots: |
||||
virtual void reloadTheme() {} |
||||
}; |
||||
|
||||
#endif //WIDGETSTYLE_H
|
Loading…
Reference in new issue