mirror of
https://github.com/YACReader/yacreader
synced 2026-03-02 10:50:04 -05:00
Add a theme factory to YACReaderLibrary and theme the comic vine dialog
This commit is contained in:
@ -1,7 +1,129 @@
|
||||
#ifndef THEME_H
|
||||
#define THEME_H
|
||||
|
||||
#include <QtGui>
|
||||
|
||||
#include "yacreader_icon.h"
|
||||
|
||||
struct ComicVineThemeTemplates {
|
||||
QString defaultLabelQSS = "QLabel {color:%1; font-size:12px;font-family:Arial;}";
|
||||
QString titleLabelQSS = "QLabel {color:%1; font-size:18px;font-family:Arial;}";
|
||||
QString coverLabelQSS = "QLabel {background-color: %1; color:%2; font-size:12px; font-family:Arial; }";
|
||||
|
||||
QString radioButtonQSS = "QRadioButton {margin-left:27px; margin-top:5px; color:%1;font-size:12px;font-family:Arial;}"
|
||||
"QRadioButton::indicator {width:11px;height:11px;}"
|
||||
"QRadioButton::indicator::unchecked {image : url(%2);}"
|
||||
"QRadioButton::indicator::checked {image : url(%3);}";
|
||||
|
||||
QString checkBoxQSS = "QCheckBox {"
|
||||
" color: %1;"
|
||||
" font-size: 12px;"
|
||||
" font-family: Arial;"
|
||||
" spacing: 10px;"
|
||||
"}"
|
||||
"QCheckBox::indicator {"
|
||||
" width: 13px;"
|
||||
" height: 13px;"
|
||||
" border: 1px solid %2;"
|
||||
" background: %3;"
|
||||
"}"
|
||||
"QCheckBox::indicator:checked {"
|
||||
" image: url(%4);"
|
||||
" background: %3;"
|
||||
"}"
|
||||
"QCheckBox::indicator:unchecked {"
|
||||
" background: %3;"
|
||||
"}";
|
||||
|
||||
QString scraperLineEditTitleLabelQSS = "QLabel {color:%1;}";
|
||||
QString scraperLineEditQSS = "QLineEdit {"
|
||||
"border:none; background-color: %1; color : %2; padding-left: %3; padding-bottom: 1px; margin-bottom: 0px;"
|
||||
"}";
|
||||
|
||||
QString scraperToolButtonQSS = "QPushButton {border: none; background: %1; color:%2; border-radius:2px;}"
|
||||
"QPushButton::pressed {border: none; background: %3; color:%2; border-radius:2px;}";
|
||||
QString scraperToolButtonSeparatorQSS = "QWidget {background:%1;}";
|
||||
|
||||
QString scraperScrollLabelTextQSS = "QLabel {background-color: %1; color:%2; font-size:12px; font-family:Arial; } QLabel::link { color: %3; font-size:12px; font-family:Arial; }";
|
||||
QString scraperScrollLabelScrollAreaQSS = "QScrollArea {background-color:%1; border:none;}"
|
||||
"QScrollBar:vertical { border: none; background: %1; width: 3px; margin: 0; }"
|
||||
"QScrollBar:horizontal { border: none; background: %1; height: 3px; margin: 0; }"
|
||||
"QScrollBar::handle:vertical { background: %2; width: 7px; min-height: 20px; }"
|
||||
"QScrollBar::handle:horizontal { background: %2; width: 7px; min-height: 20px; }"
|
||||
"QScrollBar::add-line:vertical { border: none; background: %3; height: 10px; subcontrol-position: bottom; subcontrol-origin: margin; margin: 0 3px 0 0;}"
|
||||
"QScrollBar::sub-line:vertical { border: none; background: %3; height: 10px; subcontrol-position: top; subcontrol-origin: margin; margin: 0 3px 0 0;}"
|
||||
"QScrollBar::add-line:horizontal { border: none; background: %3; width: 10px; subcontrol-position: bottom; subcontrol-origin: margin; margin: 0 0 3px 0;}"
|
||||
"QScrollBar::sub-line:horizontal { border: none; background: %3; width: 10px; subcontrol-position: top; subcontrol-origin: margin; margin: 0 0 3px 0;}"
|
||||
"QScrollBar::up-arrow:vertical {border:none;width: 9px;height: 6px;background: url(':/images/folders_view/line-up.png') center top no-repeat;}"
|
||||
"QScrollBar::down-arrow:vertical {border:none;width: 9px;height: 6px;background: url(':/images/folders_view/line-down.png') center top no-repeat;}"
|
||||
"QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical, QScrollBar::add-page:horizontal, QScrollBar::sub-page:horizontal {background: none; }";
|
||||
|
||||
QString scraperTableViewQSS = "QTableView {color:%1; border:0px;alternate-background-color: %2;background-color: %3; outline: 0px;}"
|
||||
"QTableView::item {outline: 0px; border: 0px; color:%1;}"
|
||||
"QTableView::item:selected {outline: 0px; background-color: %4; }"
|
||||
"QHeaderView::section:horizontal {background-color:%5; border-bottom:1px solid %6; border-right:1px solid qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 %5, stop: 1 %6); border-left:none; border-top:none; padding:4px; color:%7;}"
|
||||
"QHeaderView::section:vertical {border-bottom: 1px solid %8;border-top: 1px solid %9;}"
|
||||
"QHeaderView::down-arrow {image: url('%12');width: 8px;height: 7px;padding-right: 10px;}"
|
||||
"QHeaderView::up-arrow {image: url('%13');width: 8px;height: 7px; padding-right: 10px;}"
|
||||
"QScrollBar:vertical { border: none; background: %3; width: 3px; margin: 0; }"
|
||||
"QScrollBar:horizontal { border: none; background: %3; height: 3px; margin: 0; }"
|
||||
"QScrollBar::handle:vertical { background: %10; width: 7px; min-height: 20px; }"
|
||||
"QScrollBar::handle:horizontal { background: %10; width: 7px; min-height: 20px; }"
|
||||
"QScrollBar::add-line:vertical { border: none; background: %11; height: 10px; subcontrol-position: bottom; subcontrol-origin: margin; margin: 0 3px 0 0;}"
|
||||
"QScrollBar::sub-line:vertical { border: none; background: %11; height: 10px; subcontrol-position: top; subcontrol-origin: margin; margin: 0 3px 0 0;}"
|
||||
"QScrollBar::add-line:horizontal { border: none; background: %11; width: 10px; subcontrol-position: bottom; subcontrol-origin: margin; margin: 0 0 3px 0;}"
|
||||
"QScrollBar::sub-line:horizontal { border: none; background: %11; width: 10px; subcontrol-position: top; subcontrol-origin: margin; margin: 0 0 3px 0;}"
|
||||
"QScrollBar::up-arrow:vertical {border:none;width: 9px;height: 6px;background: url(':/images/folders_view/line-up.png') center top no-repeat;}"
|
||||
"QScrollBar::down-arrow:vertical {border:none;width: 9px;height: 6px;background: url(':/images/folders_view/line-down.png') center top no-repeat;}"
|
||||
"QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical, QScrollBar::add-page:horizontal, QScrollBar::sub-page:horizontal {background: none; }";
|
||||
|
||||
QString dialogQSS = "QDialog {background-color: %1; }";
|
||||
QString dialogButtonsQSS = "QPushButton {border: 1px solid %1; background: %2; color:%3; padding: 5px 26px 5px 26px; font-size:12px;font-family:Arial; font-weight:bold;}";
|
||||
|
||||
QString nextPageIcon = ":/images/comic_vine/nextPage.svg";
|
||||
QString previousPageIcon = ":/images/comic_vine/previousPage.svg";
|
||||
QSize pageIconSize = QSize(7, 8);
|
||||
|
||||
QString rowUpIcon = ":/images/comic_vine/rowUp.svg";
|
||||
QString rowDownIcon = ":/images/comic_vine/rowDown.svg";
|
||||
QSize rowIconSize = QSize(8, 7);
|
||||
};
|
||||
|
||||
struct ComicVineTheme {
|
||||
QString defaultLabelQSS;
|
||||
QString titleLabelQSS;
|
||||
QString coverLabelQSS;
|
||||
QString radioButtonQSS;
|
||||
QString checkBoxQSS;
|
||||
|
||||
QString scraperLineEditTitleLabelQSS;
|
||||
QString scraperLineEditQSS;
|
||||
|
||||
QString scraperToolButtonQSS;
|
||||
QString scraperToolButtonSeparatorQSS;
|
||||
QColor scraperToolButtonFillColor;
|
||||
|
||||
QString scraperScrollLabelTextQSS;
|
||||
QString scraperScrollLabelScrollAreaQSS;
|
||||
|
||||
QString scraperTableViewQSS;
|
||||
|
||||
QString dialogQSS;
|
||||
QString dialogButtonsQSS;
|
||||
|
||||
QString noBorderToolButtonQSS = "QToolButton { border: none; }";
|
||||
|
||||
QColor busyIndicatorColor;
|
||||
|
||||
YACReaderIcon nextPageIcon;
|
||||
YACReaderIcon previousPageIcon;
|
||||
|
||||
YACReaderIcon rowUpIcon;
|
||||
YACReaderIcon rowDownIcon;
|
||||
};
|
||||
|
||||
struct Theme {
|
||||
ComicVineTheme comicVine;
|
||||
};
|
||||
|
||||
#endif // THEME_H
|
||||
|
||||
299
YACReaderLibrary/themes/theme_factory.cpp
Normal file
299
YACReaderLibrary/themes/theme_factory.cpp
Normal file
@ -0,0 +1,299 @@
|
||||
#include "theme_factory.h"
|
||||
|
||||
#include "icon_utils.h"
|
||||
|
||||
struct ComicVineParams {
|
||||
|
||||
ComicVineThemeTemplates t;
|
||||
|
||||
QColor contentTextColor;
|
||||
QColor contentBackgroundColor;
|
||||
QColor contentAltBackgroundColor;
|
||||
QColor dialogBackgroundColor;
|
||||
|
||||
QColor tableBackgroundColor;
|
||||
QColor tableAltBackgroundColor;
|
||||
QColor tableBorderColor;
|
||||
QColor tableSelectedColor;
|
||||
QColor tableHeaderBackgroundColor;
|
||||
QColor tableHeaderBorderColor;
|
||||
QColor tableHeaderTextColor;
|
||||
QColor tableScrollHandleColor;
|
||||
QColor tableScrollBackgroundColor;
|
||||
QColor tableSectionBorderLight;
|
||||
QColor tableSectionBorderDark;
|
||||
|
||||
QColor labelTextColor;
|
||||
QColor labelBackgroundColor;
|
||||
QColor hyperlinkColor; // TODO: it doesn't work
|
||||
|
||||
QColor buttonBackgroundColor;
|
||||
QColor buttonTextColor;
|
||||
QColor buttonBorderColor;
|
||||
|
||||
QString radioUncheckedPath;
|
||||
QColor radioUncheckedColor;
|
||||
|
||||
QString radioCheckedPath;
|
||||
QColor radioCheckedBackgroundColor;
|
||||
QColor radioCheckedIndicatorColor;
|
||||
|
||||
QColor checkBoxTickColor;
|
||||
|
||||
QColor toolButtonAccentColor;
|
||||
|
||||
QColor downArrowColor;
|
||||
QColor upArrowColor;
|
||||
|
||||
QColor busyIndicatorColor;
|
||||
QColor navIconColor;
|
||||
QColor rowIconColor;
|
||||
};
|
||||
|
||||
struct ThemeParams {
|
||||
QString themeName;
|
||||
|
||||
ComicVineParams comicVineParams;
|
||||
};
|
||||
|
||||
Theme makeTheme(const ThemeParams ¶ms)
|
||||
{
|
||||
Theme theme;
|
||||
|
||||
const auto &cv = params.comicVineParams;
|
||||
const auto &t = cv.t;
|
||||
|
||||
auto recolor = [&](const QString &path, const QColor &color) {
|
||||
return recoloredSvgToThemeFile(path, color, params.themeName);
|
||||
};
|
||||
|
||||
theme.comicVine.defaultLabelQSS = t.defaultLabelQSS.arg(cv.labelTextColor.name());
|
||||
theme.comicVine.titleLabelQSS = t.titleLabelQSS.arg(cv.labelTextColor.name());
|
||||
theme.comicVine.coverLabelQSS = t.coverLabelQSS.arg(cv.labelBackgroundColor.name(), cv.labelTextColor.name());
|
||||
theme.comicVine.radioButtonQSS = t.radioButtonQSS.arg(cv.buttonTextColor.name(), recolor(cv.radioUncheckedPath, cv.radioUncheckedColor), recoloredSvgToThemeFile(cv.radioCheckedPath, cv.radioCheckedBackgroundColor, cv.radioCheckedIndicatorColor, params.themeName));
|
||||
theme.comicVine.checkBoxQSS = t.checkBoxQSS.arg(cv.buttonTextColor.name(), cv.buttonBorderColor.name(), cv.buttonBackgroundColor.name(), recolor(":/images/comic_vine/checkBoxTick.svg", cv.checkBoxTickColor));
|
||||
|
||||
theme.comicVine.scraperLineEditTitleLabelQSS = t.scraperLineEditTitleLabelQSS.arg(cv.contentTextColor.name());
|
||||
theme.comicVine.scraperLineEditQSS = t.scraperLineEditQSS.arg(cv.contentAltBackgroundColor.name(), cv.contentTextColor.name(), "%1");
|
||||
|
||||
theme.comicVine.scraperToolButtonQSS = t.scraperToolButtonQSS.arg(cv.buttonBackgroundColor.name(), cv.buttonTextColor.name(), cv.toolButtonAccentColor.name());
|
||||
theme.comicVine.scraperToolButtonSeparatorQSS = t.scraperToolButtonSeparatorQSS.arg(cv.toolButtonAccentColor.name());
|
||||
theme.comicVine.scraperToolButtonFillColor = cv.buttonBackgroundColor;
|
||||
|
||||
theme.comicVine.scraperScrollLabelTextQSS = t.scraperScrollLabelTextQSS.arg(cv.contentBackgroundColor.name(), cv.contentTextColor.name(), cv.hyperlinkColor.name());
|
||||
theme.comicVine.scraperScrollLabelScrollAreaQSS = t.scraperScrollLabelScrollAreaQSS.arg(cv.contentBackgroundColor.name(), cv.tableScrollHandleColor.name(), cv.tableScrollBackgroundColor.name());
|
||||
|
||||
theme.comicVine.scraperTableViewQSS = t.scraperTableViewQSS
|
||||
.arg(cv.tableHeaderTextColor.name())
|
||||
.arg(cv.tableAltBackgroundColor.name())
|
||||
.arg(cv.tableBackgroundColor.name())
|
||||
.arg(cv.tableSelectedColor.name())
|
||||
.arg(cv.tableHeaderBackgroundColor.name())
|
||||
.arg(cv.tableHeaderBorderColor.name())
|
||||
.arg(cv.tableHeaderTextColor.name())
|
||||
.arg(cv.tableSectionBorderDark.name())
|
||||
.arg(cv.tableSectionBorderLight.name())
|
||||
.arg(cv.tableScrollHandleColor.name())
|
||||
.arg(cv.tableScrollBackgroundColor.name())
|
||||
.arg(recolor(":/images/comic_vine/downArrow.svg", cv.downArrowColor))
|
||||
.arg(recolor(":/images/comic_vine/upArrow.svg", cv.upArrowColor));
|
||||
|
||||
theme.comicVine.dialogQSS = t.dialogQSS.arg(cv.dialogBackgroundColor.name());
|
||||
theme.comicVine.dialogButtonsQSS = t.dialogButtonsQSS.arg(cv.buttonBorderColor.name(), cv.buttonBackgroundColor.name(), cv.buttonTextColor.name());
|
||||
|
||||
theme.comicVine.busyIndicatorColor = cv.busyIndicatorColor;
|
||||
|
||||
theme.comicVine.nextPageIcon = { QIcon(recolor(t.nextPageIcon, cv.navIconColor)), t.pageIconSize };
|
||||
theme.comicVine.previousPageIcon = { QIcon(recolor(t.previousPageIcon, cv.navIconColor)), t.pageIconSize };
|
||||
|
||||
theme.comicVine.rowUpIcon = { QIcon(recolor(t.rowUpIcon, cv.rowIconColor)), t.rowIconSize };
|
||||
theme.comicVine.rowDownIcon = { QIcon(recolor(t.rowDownIcon, cv.rowIconColor)), t.rowIconSize };
|
||||
|
||||
return theme;
|
||||
}
|
||||
|
||||
ThemeParams classicThemeParams();
|
||||
ThemeParams lightThemeParams();
|
||||
ThemeParams darkThemeParams();
|
||||
|
||||
Theme makeTheme(ThemeId themeId)
|
||||
{
|
||||
switch (themeId) {
|
||||
case ThemeId::Classic:
|
||||
return makeTheme(classicThemeParams());
|
||||
case ThemeId::Light:
|
||||
return makeTheme(lightThemeParams());
|
||||
case ThemeId::Dark:
|
||||
return makeTheme(darkThemeParams());
|
||||
}
|
||||
|
||||
return makeTheme(classicThemeParams());
|
||||
}
|
||||
|
||||
ThemeParams classicThemeParams()
|
||||
{
|
||||
ThemeParams params;
|
||||
params.themeName = "classic";
|
||||
|
||||
ComicVineParams cv;
|
||||
cv.contentTextColor = Qt::white;
|
||||
cv.contentBackgroundColor = QColor(0x2B2B2B);
|
||||
cv.contentAltBackgroundColor = QColor(0x2B2B2B);
|
||||
cv.dialogBackgroundColor = QColor(0x404040);
|
||||
|
||||
cv.tableBackgroundColor = QColor(0x2B2B2B);
|
||||
cv.tableAltBackgroundColor = QColor(0x2E2E2E);
|
||||
cv.tableBorderColor = QColor(0x242424);
|
||||
cv.tableSelectedColor = QColor(0x555555);
|
||||
cv.tableHeaderBackgroundColor = QColor(0x292929);
|
||||
cv.tableHeaderBorderColor = QColor(0x1F1F1F);
|
||||
cv.tableHeaderTextColor = QColor(0xEBEBEB);
|
||||
cv.tableScrollHandleColor = QColor(0xDDDDDD);
|
||||
cv.tableScrollBackgroundColor = QColor(0x404040);
|
||||
cv.tableSectionBorderLight = QColor(0xFEFEFE);
|
||||
cv.tableSectionBorderDark = QColor(0xDFDFDF);
|
||||
|
||||
cv.labelTextColor = Qt::white;
|
||||
cv.labelBackgroundColor = QColor(0x2B2B2B);
|
||||
cv.hyperlinkColor = QColor(0xFFCC00);
|
||||
|
||||
cv.buttonBackgroundColor = QColor(0x2E2E2E);
|
||||
cv.buttonTextColor = Qt::white;
|
||||
cv.buttonBorderColor = QColor(0x242424);
|
||||
|
||||
cv.radioUncheckedPath = ":/images/comic_vine/radioUnchecked.png";
|
||||
cv.radioUncheckedColor = QColor(0xE5E5E5);
|
||||
|
||||
cv.radioCheckedPath = ":/images/comic_vine/radioChecked.svg";
|
||||
cv.radioCheckedBackgroundColor = QColor(0xE5E5E5);
|
||||
cv.radioCheckedIndicatorColor = QColor(0x5F5F5F);
|
||||
|
||||
cv.checkBoxTickColor = Qt::white;
|
||||
|
||||
cv.toolButtonAccentColor = QColor(0x282828);
|
||||
|
||||
cv.downArrowColor = QColor(0x9F9F9F);
|
||||
cv.upArrowColor = QColor(0x9F9F9F);
|
||||
|
||||
cv.busyIndicatorColor = Qt::white;
|
||||
cv.navIconColor = Qt::white;
|
||||
cv.rowIconColor = QColor(0xE5E5E5);
|
||||
|
||||
cv.t = ComicVineThemeTemplates();
|
||||
|
||||
params.comicVineParams = cv;
|
||||
|
||||
return params;
|
||||
}
|
||||
|
||||
ThemeParams lightThemeParams()
|
||||
{
|
||||
ThemeParams params;
|
||||
params.themeName = "light";
|
||||
|
||||
ComicVineParams cv;
|
||||
cv.contentTextColor = Qt::black;
|
||||
cv.contentBackgroundColor = QColor(0xECECEC);
|
||||
cv.contentAltBackgroundColor = QColor(0xE0E0E0);
|
||||
cv.dialogBackgroundColor = QColor(0xFBFBFB);
|
||||
|
||||
cv.tableBackgroundColor = QColor(0xF4F4F4);
|
||||
cv.tableAltBackgroundColor = QColor(0xFAFAFA);
|
||||
cv.tableBorderColor = QColor(0xCCCCCC);
|
||||
cv.tableSelectedColor = QColor(0xDDDDDD);
|
||||
cv.tableHeaderBackgroundColor = QColor(0xE0E0E0);
|
||||
cv.tableHeaderBorderColor = QColor(0xC0C0C0);
|
||||
cv.tableHeaderTextColor = QColor(0x333333);
|
||||
cv.tableScrollHandleColor = QColor(0x888888);
|
||||
cv.tableScrollBackgroundColor = QColor(0xD0D0D0);
|
||||
cv.tableSectionBorderLight = QColor(0xFFFFFF);
|
||||
cv.tableSectionBorderDark = QColor(0xCCCCCC);
|
||||
|
||||
cv.labelTextColor = Qt::black;
|
||||
cv.labelBackgroundColor = QColor(0xECECEC);
|
||||
cv.hyperlinkColor = QColor(0xFFCC00);
|
||||
|
||||
cv.buttonBackgroundColor = QColor(0xE0E0E0);
|
||||
cv.buttonTextColor = Qt::black;
|
||||
cv.buttonBorderColor = QColor(0xCCCCCC);
|
||||
|
||||
cv.radioUncheckedPath = ":/images/comic_vine/radioUnchecked.svg";
|
||||
cv.radioUncheckedColor = QColor(0xE0E0E0);
|
||||
|
||||
cv.radioCheckedPath = ":/images/comic_vine/radioChecked.svg";
|
||||
cv.radioCheckedBackgroundColor = QColor(0xE0E0E0);
|
||||
cv.radioCheckedIndicatorColor = QColor(0x222222);
|
||||
|
||||
cv.checkBoxTickColor = Qt::black;
|
||||
|
||||
cv.toolButtonAccentColor = QColor(0xA0A0A0);
|
||||
|
||||
cv.downArrowColor = QColor(0x222222);
|
||||
cv.upArrowColor = QColor(0x222222);
|
||||
|
||||
cv.busyIndicatorColor = Qt::black;
|
||||
cv.navIconColor = QColor(0x222222);
|
||||
cv.rowIconColor = QColor(0x222222);
|
||||
|
||||
cv.t = ComicVineThemeTemplates();
|
||||
|
||||
params.comicVineParams = cv;
|
||||
|
||||
return params;
|
||||
}
|
||||
|
||||
ThemeParams darkThemeParams()
|
||||
{
|
||||
ThemeParams params;
|
||||
params.themeName = "dark";
|
||||
|
||||
ComicVineParams cv;
|
||||
cv.contentTextColor = Qt::white;
|
||||
cv.contentBackgroundColor = QColor(0x2B2B2B);
|
||||
cv.contentAltBackgroundColor = QColor(0x2E2E2E);
|
||||
cv.dialogBackgroundColor = QColor(0x404040);
|
||||
|
||||
cv.tableBackgroundColor = QColor(0x2B2B2B);
|
||||
cv.tableAltBackgroundColor = QColor(0x2E2E2E);
|
||||
cv.tableBorderColor = QColor(0x242424);
|
||||
cv.tableSelectedColor = QColor(0x555555);
|
||||
cv.tableHeaderBackgroundColor = QColor(0x292929);
|
||||
cv.tableHeaderBorderColor = QColor(0x1F1F1F);
|
||||
cv.tableHeaderTextColor = QColor(0xEBEBEB);
|
||||
cv.tableScrollHandleColor = QColor(0xDDDDDD);
|
||||
cv.tableScrollBackgroundColor = QColor(0x404040);
|
||||
cv.tableSectionBorderLight = QColor(0xFEFEFE);
|
||||
cv.tableSectionBorderDark = QColor(0xDFDFDF);
|
||||
|
||||
cv.labelTextColor = Qt::white;
|
||||
cv.labelBackgroundColor = QColor(0x2B2B2B);
|
||||
cv.hyperlinkColor = QColor(0xFFCC00);
|
||||
|
||||
cv.buttonBackgroundColor = QColor(0x2E2E2E);
|
||||
cv.buttonTextColor = Qt::white;
|
||||
cv.buttonBorderColor = QColor(0x242424);
|
||||
|
||||
cv.radioUncheckedPath = ":/images/comic_vine/radioUnchecked.png";
|
||||
cv.radioUncheckedColor = QColor(0xE5E5E5);
|
||||
|
||||
cv.radioCheckedPath = ":/images/comic_vine/radioChecked.svg";
|
||||
cv.radioCheckedBackgroundColor = QColor(0xE5E5E5);
|
||||
cv.radioCheckedIndicatorColor = QColor(0x5F5F5F);
|
||||
|
||||
cv.checkBoxTickColor = Qt::white;
|
||||
|
||||
cv.toolButtonAccentColor = QColor(0x282828);
|
||||
|
||||
cv.downArrowColor = QColor(0x9F9F9F);
|
||||
cv.upArrowColor = QColor(0x9F9F9F);
|
||||
|
||||
cv.busyIndicatorColor = Qt::white;
|
||||
cv.navIconColor = Qt::white;
|
||||
cv.rowIconColor = QColor(0xE5E5E5);
|
||||
|
||||
cv.t = ComicVineThemeTemplates();
|
||||
|
||||
params.comicVineParams = cv;
|
||||
|
||||
return params;
|
||||
}
|
||||
9
YACReaderLibrary/themes/theme_factory.h
Normal file
9
YACReaderLibrary/themes/theme_factory.h
Normal file
@ -0,0 +1,9 @@
|
||||
#ifndef THEME_FACTORY_H
|
||||
#define THEME_FACTORY_H
|
||||
|
||||
#include "theme.h"
|
||||
#include "theme_id.h"
|
||||
|
||||
Theme makeTheme(ThemeId themeId);
|
||||
|
||||
#endif // THEME_FACTORY_H
|
||||
@ -2,3 +2,6 @@ INCLUDEPATH += $$PWD
|
||||
|
||||
HEADERS += \
|
||||
$$PWD/theme.h \
|
||||
$$PWD/theme_factory.h
|
||||
SOURCES += \
|
||||
$$PWD/theme_factory.cpp
|
||||
|
||||
Reference in New Issue
Block a user