view include/gui/theme.h @ 128:859d2a957940

cmake: set CXX_STANDARD to 17 builds: get wget on linux, don't attempt to mount binfmt_misc on win32/64 I'd prefer staying on C++11, but if constexpr is just so damn sexy...
author Paper <mrpapersonic@gmail.com>
date Thu, 09 Nov 2023 02:28:22 -0500
parents 39521c47c7a3
children 862d0d8619f6
line wrap: on
line source

#ifndef __gui__theme_h
#define __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 // __gui__theme_h