mirror of
https://github.com/YACReader/yacreader
synced 2026-04-12 15:49:53 -04:00
Use json file based themes instead of code to create them (theme editor + theme mode settings)
This commit is contained in:
29
common/themes/appearance_tab_widget.h
Normal file
29
common/themes/appearance_tab_widget.h
Normal file
@ -0,0 +1,29 @@
|
||||
#ifndef APPEARANCE_TAB_WIDGET_H
|
||||
#define APPEARANCE_TAB_WIDGET_H
|
||||
|
||||
#include <QJsonObject>
|
||||
#include <QPointer>
|
||||
#include <QWidget>
|
||||
#include <functional>
|
||||
|
||||
class AppearanceConfiguration;
|
||||
class ThemeEditorDialog;
|
||||
|
||||
class AppearanceTabWidget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit AppearanceTabWidget(
|
||||
AppearanceConfiguration *config,
|
||||
std::function<QJsonObject()> currentThemeJson,
|
||||
std::function<void(const QJsonObject &)> applyTheme,
|
||||
QWidget *parent = nullptr);
|
||||
|
||||
private:
|
||||
AppearanceConfiguration *config;
|
||||
std::function<QJsonObject()> currentThemeJson;
|
||||
std::function<void(const QJsonObject &)> applyTheme;
|
||||
QPointer<ThemeEditorDialog> themeEditor;
|
||||
};
|
||||
|
||||
#endif // APPEARANCE_TAB_WIDGET_H
|
||||
Reference in New Issue
Block a user