view include/gui/theme.h @ 276:ec0a2b5493f8

ini: simplify INI code, use templates less less magic voodoo code
author Paper <paper@paper.us.eu.org>
date Mon, 22 Apr 2024 19:10:28 -0400
parents 3ec7804abf17
children 657fda1b9cac
line wrap: on
line source

#ifndef MINORI_GUI_THEME_H_
#define MINORI_GUI_THEME_H_

#include <QStyle>

enum class Themes {
	OS,
	LIGHT,
	DARK
};

namespace Theme {

class Theme final {
public:
	Theme(Themes theme = Themes::OS);
	void SetTheme(Themes theme);
	Themes GetTheme() const;
	bool IsInDarkTheme() const;
	void RepaintCurrentTheme();

private:
	void SetToDarkTheme();
	void SetToLightTheme();
	void SetStyleSheet(Themes theme);
	Themes GetCurrentOSTheme() const;
	Themes theme;
};

} // namespace Theme

#endif // MINORI_GUI_THEME_H_