diff --git a/YACReaderLibrary/themes/theme.h b/YACReaderLibrary/themes/theme.h index 884c48f0..0eabd466 100644 --- a/YACReaderLibrary/themes/theme.h +++ b/YACReaderLibrary/themes/theme.h @@ -89,6 +89,11 @@ struct ComicVineThemeTemplates { QSize rowIconSize = QSize(8, 7); }; +struct ComicFlowColors { + QColor backgroundColor; + QColor textColor; +}; + struct ComicVineTheme { QString defaultLabelQSS; QString titleLabelQSS; @@ -123,6 +128,7 @@ struct ComicVineTheme { }; struct Theme { + ComicFlowColors comicFlow; ComicVineTheme comicVine; }; diff --git a/YACReaderLibrary/themes/theme_factory.cpp b/YACReaderLibrary/themes/theme_factory.cpp index 93c5fa0e..6d11c65d 100644 --- a/YACReaderLibrary/themes/theme_factory.cpp +++ b/YACReaderLibrary/themes/theme_factory.cpp @@ -3,7 +3,6 @@ #include "icon_utils.h" struct ComicVineParams { - ComicVineThemeTemplates t; QColor contentTextColor; @@ -53,6 +52,7 @@ struct ComicVineParams { struct ThemeParams { QString themeName; + ComicFlowColors comicFlowColors; ComicVineParams comicVineParams; }; @@ -60,6 +60,12 @@ Theme makeTheme(const ThemeParams ¶ms) { Theme theme; + // Comic Flow + const auto &cf = params.comicFlowColors; + theme.comicFlow.backgroundColor = cf.backgroundColor; + theme.comicFlow.textColor = cf.textColor; + + // Comic Vine const auto &cv = params.comicVineParams; const auto &t = cv.t; @@ -135,6 +141,10 @@ ThemeParams classicThemeParams() ThemeParams params; params.themeName = "classic"; + ComicFlowColors cf; + cf.backgroundColor = Qt::black; + cf.textColor = QColor(0x4C4C4C); + ComicVineParams cv; cv.contentTextColor = Qt::white; cv.contentBackgroundColor = QColor(0x2B2B2B); @@ -181,6 +191,7 @@ ThemeParams classicThemeParams() cv.t = ComicVineThemeTemplates(); + params.comicFlowColors = cf; params.comicVineParams = cv; return params; @@ -191,6 +202,10 @@ ThemeParams lightThemeParams() ThemeParams params; params.themeName = "light"; + ComicFlowColors cf; + cf.backgroundColor = Qt::white; + cf.textColor = Qt::black; + ComicVineParams cv; cv.contentTextColor = Qt::black; cv.contentBackgroundColor = QColor(0xECECEC); @@ -237,6 +252,7 @@ ThemeParams lightThemeParams() cv.t = ComicVineThemeTemplates(); + params.comicFlowColors = cf; params.comicVineParams = cv; return params; @@ -247,6 +263,10 @@ ThemeParams darkThemeParams() ThemeParams params; params.themeName = "dark"; + ComicFlowColors cf; + cf.backgroundColor = QColor(0x111111); + cf.textColor = QColor(0x888888); + ComicVineParams cv; cv.contentTextColor = Qt::white; cv.contentBackgroundColor = QColor(0x2B2B2B); @@ -293,6 +313,7 @@ ThemeParams darkThemeParams() cv.t = ComicVineThemeTemplates(); + params.comicFlowColors = cf; params.comicVineParams = cv; return params;