mirror of
https://github.com/YACReader/yacreader
synced 2025-07-21 06:24:39 -04:00
Add a theme class to store all the custom UI values used in the code.
It will need a setting for selecting the theme in the factory method.
This commit is contained in:
committed by
Luis Ángel San Martín
parent
53fcc52dd6
commit
deb1971bc9
38
YACReaderLibrary/theme.h
Normal file
38
YACReaderLibrary/theme.h
Normal file
@ -0,0 +1,38 @@
|
||||
#ifndef THEME_H
|
||||
#define THEME_H
|
||||
|
||||
#include <QtCore>
|
||||
|
||||
class Theme
|
||||
{
|
||||
public:
|
||||
Theme();
|
||||
|
||||
static Theme currentTheme() {
|
||||
Theme t;
|
||||
|
||||
if (true) { //native macos theme
|
||||
t.isMacosNative = true;
|
||||
|
||||
t.disableClassicViewCollapsing = true;
|
||||
|
||||
t.comicsViewTransitionBackground = "#FFFFFF";
|
||||
} else {
|
||||
t.isMacosNative = false;
|
||||
|
||||
t.disableClassicViewCollapsing = false;
|
||||
|
||||
t.comicsViewTransitionBackground = "#2A2A2A";
|
||||
}
|
||||
}
|
||||
|
||||
bool isMacosNative;
|
||||
|
||||
//
|
||||
bool disableClassicViewCollapsing;
|
||||
|
||||
//
|
||||
QString comicsViewTransitionBackground;
|
||||
};
|
||||
|
||||
#endif // THEME_H
|
Reference in New Issue
Block a user