mirror of
https://github.com/YACReader/yacreader
synced 2026-04-12 15:49:53 -04:00
Rename YACReaderLibrary json theme sections to be more user friendly
This commit is contained in:
@ -649,16 +649,16 @@ void ComicVineDialog::launchSearchComic()
|
||||
|
||||
void ComicVineDialog::applyTheme(const Theme &theme)
|
||||
{
|
||||
auto comicVineTheme = theme.comicVine;
|
||||
auto metadataScraperDialogTheme = theme.metadataScraperDialog;
|
||||
|
||||
setStyleSheet(comicVineTheme.dialogQSS);
|
||||
setStyleSheet(metadataScraperDialogTheme.dialogQSS);
|
||||
|
||||
skipButton->setStyleSheet(comicVineTheme.dialogButtonsQSS);
|
||||
backButton->setStyleSheet(comicVineTheme.dialogButtonsQSS);
|
||||
nextButton->setStyleSheet(comicVineTheme.dialogButtonsQSS);
|
||||
searchButton->setStyleSheet(comicVineTheme.dialogButtonsQSS);
|
||||
closeButton->setStyleSheet(comicVineTheme.dialogButtonsQSS);
|
||||
skipButton->setStyleSheet(metadataScraperDialogTheme.dialogButtonsQSS);
|
||||
backButton->setStyleSheet(metadataScraperDialogTheme.dialogButtonsQSS);
|
||||
nextButton->setStyleSheet(metadataScraperDialogTheme.dialogButtonsQSS);
|
||||
searchButton->setStyleSheet(metadataScraperDialogTheme.dialogButtonsQSS);
|
||||
closeButton->setStyleSheet(metadataScraperDialogTheme.dialogButtonsQSS);
|
||||
|
||||
loadingMessage->setStyleSheet(comicVineTheme.defaultLabelQSS);
|
||||
busyWidget->setColor(comicVineTheme.busyIndicatorColor);
|
||||
loadingMessage->setStyleSheet(metadataScraperDialogTheme.defaultLabelQSS);
|
||||
busyWidget->setColor(metadataScraperDialogTheme.busyIndicatorColor);
|
||||
}
|
||||
|
||||
@ -8,7 +8,7 @@ ScraperCheckBox::ScraperCheckBox(const QString &text, QWidget *parent)
|
||||
|
||||
void ScraperCheckBox::applyTheme(const Theme &theme)
|
||||
{
|
||||
auto comicVineTheme = theme.comicVine;
|
||||
auto metadataScraperDialogTheme = theme.metadataScraperDialog;
|
||||
|
||||
setStyleSheet(comicVineTheme.checkBoxQSS);
|
||||
setStyleSheet(metadataScraperDialogTheme.checkBoxQSS);
|
||||
}
|
||||
|
||||
@ -20,8 +20,8 @@ void ScraperLineEdit::resizeEvent(QResizeEvent *)
|
||||
|
||||
void ScraperLineEdit::applyTheme(const Theme &theme)
|
||||
{
|
||||
auto comicVineTheme = theme.comicVine;
|
||||
auto metadataScraperDialogTheme = theme.metadataScraperDialog;
|
||||
|
||||
titleLabel->setStyleSheet(comicVineTheme.scraperLineEditTitleLabelQSS);
|
||||
setStyleSheet(comicVineTheme.scraperLineEditQSS.arg(titleLabel->sizeHint().width() + 6));
|
||||
titleLabel->setStyleSheet(metadataScraperDialogTheme.scraperLineEditTitleLabelQSS);
|
||||
setStyleSheet(metadataScraperDialogTheme.scraperLineEditQSS.arg(titleLabel->sizeHint().width() + 6));
|
||||
}
|
||||
|
||||
@ -63,16 +63,16 @@ void ScraperResultsPaginator::setCustomLabel(const QString &label)
|
||||
|
||||
void ScraperResultsPaginator::applyTheme(const Theme &theme)
|
||||
{
|
||||
auto comicVineTheme = theme.comicVine;
|
||||
auto metadataScraperDialogTheme = theme.metadataScraperDialog;
|
||||
|
||||
numElements->setStyleSheet(comicVineTheme.defaultLabelQSS);
|
||||
numPages->setStyleSheet(comicVineTheme.defaultLabelQSS);
|
||||
numElements->setStyleSheet(metadataScraperDialogTheme.defaultLabelQSS);
|
||||
numPages->setStyleSheet(metadataScraperDialogTheme.defaultLabelQSS);
|
||||
|
||||
nextPage->setStyleSheet(comicVineTheme.noBorderToolButtonQSS);
|
||||
nextPage->setIconSize(comicVineTheme.nextPageIcon.size);
|
||||
nextPage->setIcon(comicVineTheme.nextPageIcon.icon);
|
||||
nextPage->setStyleSheet(metadataScraperDialogTheme.noBorderToolButtonQSS);
|
||||
nextPage->setIconSize(metadataScraperDialogTheme.nextPageIcon.size);
|
||||
nextPage->setIcon(metadataScraperDialogTheme.nextPageIcon.icon);
|
||||
|
||||
previousPage->setStyleSheet(comicVineTheme.noBorderToolButtonQSS);
|
||||
previousPage->setIconSize(comicVineTheme.previousPageIcon.size);
|
||||
previousPage->setIcon(comicVineTheme.previousPageIcon.icon);
|
||||
previousPage->setStyleSheet(metadataScraperDialogTheme.noBorderToolButtonQSS);
|
||||
previousPage->setIconSize(metadataScraperDialogTheme.previousPageIcon.size);
|
||||
previousPage->setIcon(metadataScraperDialogTheme.previousPageIcon.icon);
|
||||
}
|
||||
|
||||
@ -41,8 +41,8 @@ void ScraperScrollLabel::openLink(const QString &link)
|
||||
|
||||
void ScraperScrollLabel::applyTheme(const Theme &theme)
|
||||
{
|
||||
auto comicVineTheme = theme.comicVine;
|
||||
auto metadataScraperDialogTheme = theme.metadataScraperDialog;
|
||||
|
||||
textLabel->setStyleSheet(comicVineTheme.scraperScrollLabelTextQSS);
|
||||
setStyleSheet(comicVineTheme.scraperScrollLabelScrollAreaQSS);
|
||||
textLabel->setStyleSheet(metadataScraperDialogTheme.scraperScrollLabelTextQSS);
|
||||
setStyleSheet(metadataScraperDialogTheme.scraperScrollLabelScrollAreaQSS);
|
||||
}
|
||||
|
||||
@ -32,7 +32,7 @@ ScraperTableView::ScraperTableView(QWidget *parent)
|
||||
|
||||
void ScraperTableView::applyTheme(const Theme &theme)
|
||||
{
|
||||
auto comicVineTheme = theme.comicVine;
|
||||
auto metadataScraperDialogTheme = theme.metadataScraperDialog;
|
||||
|
||||
setStyleSheet(comicVineTheme.scraperTableViewQSS);
|
||||
setStyleSheet(metadataScraperDialogTheme.scraperTableViewQSS);
|
||||
}
|
||||
|
||||
@ -74,7 +74,7 @@ void SearchSingleComic::clean()
|
||||
|
||||
void SearchSingleComic::applyTheme(const Theme &theme)
|
||||
{
|
||||
auto comicVineTheme = theme.comicVine;
|
||||
auto metadataScraperDialogTheme = theme.metadataScraperDialog;
|
||||
|
||||
label->setStyleSheet(comicVineTheme.defaultLabelQSS);
|
||||
label->setStyleSheet(metadataScraperDialogTheme.defaultLabelQSS);
|
||||
}
|
||||
|
||||
@ -49,7 +49,7 @@ QString SearchVolume::getVolumeInfo() const
|
||||
|
||||
void SearchVolume::applyTheme(const Theme &theme)
|
||||
{
|
||||
auto comicVineTheme = theme.comicVine;
|
||||
auto metadataScraperDialogTheme = theme.metadataScraperDialog;
|
||||
|
||||
label->setStyleSheet(comicVineTheme.defaultLabelQSS);
|
||||
label->setStyleSheet(metadataScraperDialogTheme.defaultLabelQSS);
|
||||
}
|
||||
|
||||
@ -165,8 +165,8 @@ QString SelectComic::getSelectedComicId()
|
||||
|
||||
void SelectComic::applyTheme(const Theme &theme)
|
||||
{
|
||||
auto comicVineTheme = theme.comicVine;
|
||||
auto metadataScraperDialogTheme = theme.metadataScraperDialog;
|
||||
|
||||
label->setStyleSheet(comicVineTheme.defaultLabelQSS);
|
||||
cover->setStyleSheet(comicVineTheme.coverLabelQSS);
|
||||
label->setStyleSheet(metadataScraperDialogTheme.defaultLabelQSS);
|
||||
cover->setStyleSheet(metadataScraperDialogTheme.coverLabelQSS);
|
||||
}
|
||||
|
||||
@ -219,8 +219,8 @@ SelectedVolumeInfo SelectVolume::getSelectedVolumeInfo()
|
||||
|
||||
void SelectVolume::applyTheme(const Theme &theme)
|
||||
{
|
||||
auto comicVineTheme = theme.comicVine;
|
||||
auto metadataScraperDialogTheme = theme.metadataScraperDialog;
|
||||
|
||||
label->setStyleSheet(comicVineTheme.defaultLabelQSS);
|
||||
cover->setStyleSheet(comicVineTheme.coverLabelQSS);
|
||||
label->setStyleSheet(metadataScraperDialogTheme.defaultLabelQSS);
|
||||
cover->setStyleSheet(metadataScraperDialogTheme.coverLabelQSS);
|
||||
}
|
||||
|
||||
@ -40,9 +40,9 @@ void SeriesQuestion::setYes(bool y)
|
||||
|
||||
void SeriesQuestion::applyTheme(const Theme &theme)
|
||||
{
|
||||
auto comicVineTheme = theme.comicVine;
|
||||
auto metadataScraperDialogTheme = theme.metadataScraperDialog;
|
||||
|
||||
questionLabel->setStyleSheet(comicVineTheme.defaultLabelQSS);
|
||||
yes->setStyleSheet(comicVineTheme.radioButtonQSS);
|
||||
no->setStyleSheet(comicVineTheme.radioButtonQSS);
|
||||
questionLabel->setStyleSheet(metadataScraperDialogTheme.defaultLabelQSS);
|
||||
yes->setStyleSheet(metadataScraperDialogTheme.radioButtonQSS);
|
||||
no->setStyleSheet(metadataScraperDialogTheme.radioButtonQSS);
|
||||
}
|
||||
|
||||
@ -22,8 +22,8 @@ QWidget *ScrapperToolButton::getSeparator()
|
||||
{
|
||||
QWidget *w = new QWidget;
|
||||
w->setFixedWidth(1);
|
||||
auto comicVineTheme = ThemeManager::instance().getCurrentTheme().comicVine;
|
||||
w->setStyleSheet(comicVineTheme.scraperToolButtonSeparatorQSS);
|
||||
auto metadataScraperDialogTheme = ThemeManager::instance().getCurrentTheme().metadataScraperDialog;
|
||||
w->setStyleSheet(metadataScraperDialogTheme.scraperToolButtonSeparatorQSS);
|
||||
return w;
|
||||
}
|
||||
|
||||
@ -47,9 +47,9 @@ void ScrapperToolButton::paintEvent(QPaintEvent *e)
|
||||
|
||||
void ScrapperToolButton::applyTheme(const Theme &theme)
|
||||
{
|
||||
auto comicVineTheme = theme.comicVine;
|
||||
setStyleSheet(comicVineTheme.scraperToolButtonQSS);
|
||||
fillColor = comicVineTheme.scraperToolButtonFillColor;
|
||||
auto metadataScraperDialogTheme = theme.metadataScraperDialog;
|
||||
setStyleSheet(metadataScraperDialogTheme.scraperToolButtonQSS);
|
||||
fillColor = metadataScraperDialogTheme.scraperToolButtonFillColor;
|
||||
update();
|
||||
}
|
||||
|
||||
@ -267,13 +267,13 @@ QList<QPair<ComicDB, QString>> SortVolumeComics::getMatchingInfo()
|
||||
|
||||
void SortVolumeComics::applyTheme(const Theme &theme)
|
||||
{
|
||||
auto comicVineTheme = theme.comicVine;
|
||||
auto metadataScraperDialogTheme = theme.metadataScraperDialog;
|
||||
|
||||
label->setStyleSheet(comicVineTheme.defaultLabelQSS);
|
||||
sortLabel->setStyleSheet(comicVineTheme.defaultLabelQSS);
|
||||
label->setStyleSheet(metadataScraperDialogTheme.defaultLabelQSS);
|
||||
sortLabel->setStyleSheet(metadataScraperDialogTheme.defaultLabelQSS);
|
||||
|
||||
moveUpButtonCL->setIconSize(comicVineTheme.rowUpIcon.size);
|
||||
moveUpButtonCL->setIcon(comicVineTheme.rowUpIcon.icon);
|
||||
moveDownButtonCL->setIconSize(comicVineTheme.rowDownIcon.size);
|
||||
moveDownButtonCL->setIcon(comicVineTheme.rowDownIcon.icon);
|
||||
moveUpButtonCL->setIconSize(metadataScraperDialogTheme.rowUpIcon.size);
|
||||
moveUpButtonCL->setIcon(metadataScraperDialogTheme.rowUpIcon.icon);
|
||||
moveDownButtonCL->setIconSize(metadataScraperDialogTheme.rowDownIcon.size);
|
||||
moveDownButtonCL->setIcon(metadataScraperDialogTheme.rowDownIcon.icon);
|
||||
}
|
||||
|
||||
@ -49,8 +49,8 @@ void TitleHeader::showButtons(bool show)
|
||||
|
||||
void TitleHeader::applyTheme(const Theme &theme)
|
||||
{
|
||||
auto comicVineTheme = theme.comicVine;
|
||||
auto metadataScraperDialogTheme = theme.metadataScraperDialog;
|
||||
|
||||
mainTitleLabel->setStyleSheet(comicVineTheme.titleLabelQSS);
|
||||
subTitleLabel->setStyleSheet(comicVineTheme.defaultLabelQSS);
|
||||
mainTitleLabel->setStyleSheet(metadataScraperDialogTheme.titleLabelQSS);
|
||||
subTitleLabel->setStyleSheet(metadataScraperDialogTheme.defaultLabelQSS);
|
||||
}
|
||||
|
||||
@ -10,12 +10,12 @@ ComicsViewTransition::ComicsViewTransition(QWidget *parent)
|
||||
|
||||
void ComicsViewTransition::applyTheme(const Theme &theme)
|
||||
{
|
||||
setStyleSheet(QString("QWidget {background:%1}").arg(theme.defaultContentBackgroundColor.name()));
|
||||
setStyleSheet(QString("QWidget {background:%1}").arg(theme.gridAndInfoView.backgroundColor.name()));
|
||||
update();
|
||||
}
|
||||
|
||||
void ComicsViewTransition::paintEvent(QPaintEvent *)
|
||||
{
|
||||
QPainter painter(this);
|
||||
painter.fillRect(0, 0, width(), height(), theme.defaultContentBackgroundColor);
|
||||
painter.fillRect(0, 0, width(), height(), theme.gridAndInfoView.backgroundColor);
|
||||
}
|
||||
|
||||
@ -144,8 +144,8 @@ void FolderModel::applyTheme(const Theme &theme)
|
||||
folderIcon = QFileIconProvider().icon(QFileIconProvider::Folder);
|
||||
folderFinishedIcon = drawFinishedFolderIcon(sidebarIcons.folderReadOverlay);
|
||||
} else {
|
||||
folderIcon = theme.treeView.folderIcon;
|
||||
folderFinishedIcon = theme.treeView.folderFinishedIcon;
|
||||
folderIcon = theme.navigationTree.folderIcon;
|
||||
folderFinishedIcon = theme.navigationTree.folderFinishedIcon;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -153,7 +153,7 @@ QIcon ReadingListItem::getIcon() const
|
||||
else if (theme.sidebarIcons.useSystemFolderIcons)
|
||||
return QFileIconProvider().icon(QFileIconProvider::Folder);
|
||||
else
|
||||
return theme.treeView.folderIcon; // sublist
|
||||
return theme.navigationTree.folderIcon; // sublist
|
||||
}
|
||||
|
||||
int ReadingListItem::childCount() const
|
||||
|
||||
@ -263,36 +263,36 @@ void FolderContentView::droppedFiles(const QList<QUrl> &urls, Qt::DropAction act
|
||||
void FolderContentView::applyTheme(const Theme &theme)
|
||||
{
|
||||
QQmlContext *ctxt = view->rootContext();
|
||||
const auto &qv = theme.qmlView;
|
||||
const auto &giv = theme.gridAndInfoView;
|
||||
|
||||
toolbar->setStyleSheet(theme.comicsViewToolbar.toolbarQSS);
|
||||
|
||||
// Continue reading section colors
|
||||
ctxt->setContextProperty("continueReadingBackgroundColor", qv.continueReadingBackgroundColor);
|
||||
ctxt->setContextProperty("continueReadingColor", qv.continueReadingColor);
|
||||
ctxt->setContextProperty("continueReadingBackgroundColor", giv.continueReadingBackgroundColor);
|
||||
ctxt->setContextProperty("continueReadingColor", giv.continueReadingColor);
|
||||
|
||||
// Grid colors
|
||||
ctxt->setContextProperty("backgroundColor", qv.backgroundColor);
|
||||
ctxt->setContextProperty("cellColor", qv.cellColor);
|
||||
ctxt->setContextProperty("selectedColor", qv.selectedColor);
|
||||
ctxt->setContextProperty("selectedBorderColor", qv.selectedBorderColor);
|
||||
ctxt->setContextProperty("borderColor", qv.borderColor);
|
||||
ctxt->setContextProperty("titleColor", qv.titleColor);
|
||||
ctxt->setContextProperty("textColor", qv.textColor);
|
||||
ctxt->setContextProperty("dropShadow", QVariant(qv.showDropShadow));
|
||||
ctxt->setContextProperty("backgroundColor", giv.backgroundColor);
|
||||
ctxt->setContextProperty("cellColor", giv.cellColor);
|
||||
ctxt->setContextProperty("selectedColor", giv.selectedColor);
|
||||
ctxt->setContextProperty("selectedBorderColor", giv.selectedBorderColor);
|
||||
ctxt->setContextProperty("borderColor", giv.borderColor);
|
||||
ctxt->setContextProperty("titleColor", giv.titleColor);
|
||||
ctxt->setContextProperty("textColor", giv.textColor);
|
||||
ctxt->setContextProperty("dropShadow", QVariant(giv.showDropShadow));
|
||||
|
||||
// Info panel colors
|
||||
ctxt->setContextProperty("infoBackgroundColor", qv.infoBackgroundColor);
|
||||
ctxt->setContextProperty("infoTextColor", qv.infoTextColor);
|
||||
ctxt->setContextProperty("infoTitleColor", qv.infoTitleColor);
|
||||
ctxt->setContextProperty("infoBackgroundColor", giv.infoBackgroundColor);
|
||||
ctxt->setContextProperty("infoTextColor", giv.infoTextColor);
|
||||
ctxt->setContextProperty("infoTitleColor", giv.infoTitleColor);
|
||||
|
||||
// Rating and favorite colors
|
||||
ctxt->setContextProperty("ratingUnselectedColor", qv.ratingUnselectedColor);
|
||||
ctxt->setContextProperty("ratingSelectedColor", qv.ratingSelectedColor);
|
||||
ctxt->setContextProperty("favUncheckedColor", qv.favUncheckedColor);
|
||||
ctxt->setContextProperty("favCheckedColor", qv.favCheckedColor);
|
||||
ctxt->setContextProperty("readTickUncheckedColor", qv.readTickUncheckedColor);
|
||||
ctxt->setContextProperty("readTickCheckedColor", qv.readTickCheckedColor);
|
||||
ctxt->setContextProperty("ratingUnselectedColor", giv.ratingUnselectedColor);
|
||||
ctxt->setContextProperty("ratingSelectedColor", giv.ratingSelectedColor);
|
||||
ctxt->setContextProperty("favUncheckedColor", giv.favUncheckedColor);
|
||||
ctxt->setContextProperty("favCheckedColor", giv.favCheckedColor);
|
||||
ctxt->setContextProperty("readTickUncheckedColor", giv.readTickUncheckedColor);
|
||||
ctxt->setContextProperty("readTickCheckedColor", giv.readTickCheckedColor);
|
||||
|
||||
// Update zoom slider icons
|
||||
if (smallZoomLabel) {
|
||||
|
||||
@ -219,10 +219,10 @@ void GridComicsView::updateBackgroundConfig()
|
||||
}
|
||||
|
||||
// Use theme colors for cell and selected colors
|
||||
const auto &qv = theme.qmlView;
|
||||
ctxt->setContextProperty("backgroundColor", useBackgroundImage ? qv.backgroundBlurOverlayColor : qv.backgroundColor);
|
||||
ctxt->setContextProperty("cellColor", useBackgroundImage ? qv.cellColorWithBackground : qv.cellColor);
|
||||
ctxt->setContextProperty("selectedColor", qv.selectedColor);
|
||||
const auto &giv = theme.gridAndInfoView;
|
||||
ctxt->setContextProperty("backgroundColor", useBackgroundImage ? giv.backgroundBlurOverlayColor : giv.backgroundColor);
|
||||
ctxt->setContextProperty("cellColor", useBackgroundImage ? giv.cellColorWithBackground : giv.cellColor);
|
||||
ctxt->setContextProperty("selectedColor", giv.selectedColor);
|
||||
}
|
||||
|
||||
void GridComicsView::showInfo()
|
||||
@ -488,34 +488,34 @@ void GridComicsView::selectedItem(int index)
|
||||
void GridComicsView::applyTheme(const Theme &theme)
|
||||
{
|
||||
QQmlContext *ctxt = view->rootContext();
|
||||
const auto &qv = theme.qmlView;
|
||||
const auto &giv = theme.gridAndInfoView;
|
||||
|
||||
// Grid colors
|
||||
ctxt->setContextProperty("backgroundColor", qv.backgroundColor);
|
||||
ctxt->setContextProperty("backgroundBlurOverlayColor", qv.backgroundBlurOverlayColor);
|
||||
ctxt->setContextProperty("cellColor", qv.cellColor);
|
||||
ctxt->setContextProperty("selectedColor", qv.selectedColor);
|
||||
ctxt->setContextProperty("selectedBorderColor", qv.selectedBorderColor);
|
||||
ctxt->setContextProperty("borderColor", qv.borderColor);
|
||||
ctxt->setContextProperty("titleColor", qv.titleColor);
|
||||
ctxt->setContextProperty("textColor", qv.textColor);
|
||||
ctxt->setContextProperty("showDropShadow", QVariant(qv.showDropShadow));
|
||||
ctxt->setContextProperty("backgroundColor", giv.backgroundColor);
|
||||
ctxt->setContextProperty("backgroundBlurOverlayColor", giv.backgroundBlurOverlayColor);
|
||||
ctxt->setContextProperty("cellColor", giv.cellColor);
|
||||
ctxt->setContextProperty("selectedColor", giv.selectedColor);
|
||||
ctxt->setContextProperty("selectedBorderColor", giv.selectedBorderColor);
|
||||
ctxt->setContextProperty("borderColor", giv.borderColor);
|
||||
ctxt->setContextProperty("titleColor", giv.titleColor);
|
||||
ctxt->setContextProperty("textColor", giv.textColor);
|
||||
ctxt->setContextProperty("showDropShadow", QVariant(giv.showDropShadow));
|
||||
|
||||
// Info panel colors
|
||||
ctxt->setContextProperty("infoBackgroundColor", qv.infoBackgroundColor);
|
||||
ctxt->setContextProperty("infoTextColor", qv.infoTextColor);
|
||||
ctxt->setContextProperty("infoTitleColor", qv.infoTitleColor);
|
||||
ctxt->setContextProperty("infoBackgroundColor", giv.infoBackgroundColor);
|
||||
ctxt->setContextProperty("infoTextColor", giv.infoTextColor);
|
||||
ctxt->setContextProperty("infoTitleColor", giv.infoTitleColor);
|
||||
|
||||
// Rating and favorite colors
|
||||
ctxt->setContextProperty("ratingUnselectedColor", qv.ratingUnselectedColor);
|
||||
ctxt->setContextProperty("ratingSelectedColor", qv.ratingSelectedColor);
|
||||
ctxt->setContextProperty("favUncheckedColor", qv.favUncheckedColor);
|
||||
ctxt->setContextProperty("favCheckedColor", qv.favCheckedColor);
|
||||
ctxt->setContextProperty("readTickUncheckedColor", qv.readTickUncheckedColor);
|
||||
ctxt->setContextProperty("readTickCheckedColor", qv.readTickCheckedColor);
|
||||
ctxt->setContextProperty("ratingUnselectedColor", giv.ratingUnselectedColor);
|
||||
ctxt->setContextProperty("ratingSelectedColor", giv.ratingSelectedColor);
|
||||
ctxt->setContextProperty("favUncheckedColor", giv.favUncheckedColor);
|
||||
ctxt->setContextProperty("favCheckedColor", giv.favCheckedColor);
|
||||
ctxt->setContextProperty("readTickUncheckedColor", giv.readTickUncheckedColor);
|
||||
ctxt->setContextProperty("readTickCheckedColor", giv.readTickCheckedColor);
|
||||
|
||||
// Current comic banner
|
||||
ctxt->setContextProperty("currentComicBackgroundColor", qv.currentComicBackgroundColor);
|
||||
ctxt->setContextProperty("currentComicBackgroundColor", giv.currentComicBackgroundColor);
|
||||
|
||||
// Update background config to apply theme cell colors
|
||||
updateBackgroundConfig();
|
||||
|
||||
@ -224,7 +224,7 @@ void InfoComicsView::selectedItem(int index)
|
||||
void InfoComicsView::applyTheme(const Theme &theme)
|
||||
{
|
||||
QQmlContext *ctxt = view->rootContext();
|
||||
const auto &qv = theme.qmlView;
|
||||
const auto &giv = theme.gridAndInfoView;
|
||||
|
||||
// Info panel colors
|
||||
// Cache-bust the SVG file URLs so QML's image cache doesn't serve stale
|
||||
@ -235,21 +235,21 @@ void InfoComicsView::applyTheme(const Theme &theme)
|
||||
url.setQuery(bust);
|
||||
return url;
|
||||
};
|
||||
ctxt->setContextProperty("infoBackgroundColor", qv.infoBackgroundColor);
|
||||
ctxt->setContextProperty("topShadow", svgUrl(qv.topShadow));
|
||||
ctxt->setContextProperty("infoShadow", svgUrl(qv.infoShadow));
|
||||
ctxt->setContextProperty("infoIndicator", svgUrl(qv.infoIndicator));
|
||||
ctxt->setContextProperty("infoTextColor", qv.infoTextColor);
|
||||
ctxt->setContextProperty("infoTitleColor", qv.infoTitleColor);
|
||||
ctxt->setContextProperty("infoBackgroundColor", giv.infoBackgroundColor);
|
||||
ctxt->setContextProperty("topShadow", svgUrl(giv.topShadow));
|
||||
ctxt->setContextProperty("infoShadow", svgUrl(giv.infoShadow));
|
||||
ctxt->setContextProperty("infoIndicator", svgUrl(giv.infoIndicator));
|
||||
ctxt->setContextProperty("infoTextColor", giv.infoTextColor);
|
||||
ctxt->setContextProperty("infoTitleColor", giv.infoTitleColor);
|
||||
|
||||
// Rating and favorite colors
|
||||
ctxt->setContextProperty("ratingUnselectedColor", qv.ratingUnselectedColor);
|
||||
ctxt->setContextProperty("ratingSelectedColor", qv.ratingSelectedColor);
|
||||
ctxt->setContextProperty("favUncheckedColor", qv.favUncheckedColor);
|
||||
ctxt->setContextProperty("favCheckedColor", qv.favCheckedColor);
|
||||
ctxt->setContextProperty("readTickUncheckedColor", qv.readTickUncheckedColor);
|
||||
ctxt->setContextProperty("readTickCheckedColor", qv.readTickCheckedColor);
|
||||
ctxt->setContextProperty("ratingUnselectedColor", giv.ratingUnselectedColor);
|
||||
ctxt->setContextProperty("ratingSelectedColor", giv.ratingSelectedColor);
|
||||
ctxt->setContextProperty("favUncheckedColor", giv.favUncheckedColor);
|
||||
ctxt->setContextProperty("favCheckedColor", giv.favCheckedColor);
|
||||
ctxt->setContextProperty("readTickUncheckedColor", giv.readTickUncheckedColor);
|
||||
ctxt->setContextProperty("readTickCheckedColor", giv.readTickCheckedColor);
|
||||
|
||||
ctxt->setContextProperty("showDropShadow", QVariant(qv.showDropShadow));
|
||||
ctxt->setContextProperty("backgroundBlurOverlayColor", qv.backgroundBlurOverlayColor);
|
||||
ctxt->setContextProperty("showDropShadow", QVariant(giv.showDropShadow));
|
||||
ctxt->setContextProperty("backgroundBlurOverlayColor", giv.backgroundBlurOverlayColor);
|
||||
}
|
||||
|
||||
@ -4,12 +4,11 @@
|
||||
"displayName": "Default Classic",
|
||||
"variant": "dark"
|
||||
},
|
||||
"defaultContentBackgroundColor": "#2a2a2a",
|
||||
"comicFlow": {
|
||||
"backgroundColor": "#000000",
|
||||
"textColor": "#4c4c4c"
|
||||
},
|
||||
"comicVine": {
|
||||
"metadataScraperDialog": {
|
||||
"contentTextColor": "#ffffff",
|
||||
"contentBackgroundColor": "#2b2b2b",
|
||||
"contentAltBackgroundColor": "#2b2b2b",
|
||||
@ -122,7 +121,7 @@
|
||||
"horizontalHandleHeight": 4,
|
||||
"verticalHandleWidth": 4
|
||||
},
|
||||
"treeView": {
|
||||
"navigationTree": {
|
||||
"textColor": "#dddfdf",
|
||||
"selectionBackgroundColor": "#2e2e2e",
|
||||
"scrollBackgroundColor": "#404040",
|
||||
@ -138,7 +137,7 @@
|
||||
"folderReadOverlayColor": "#464646",
|
||||
"folderReadOverlaySelectedColor": "#464646"
|
||||
},
|
||||
"tableView": {
|
||||
"comicsViewTable": {
|
||||
"alternateBackgroundColor": "#f2f2f2",
|
||||
"backgroundColor": "#fafafa",
|
||||
"headerBackgroundColor": "#f5f5f5",
|
||||
@ -155,7 +154,7 @@
|
||||
"starRatingColor": "#e9be0f",
|
||||
"starRatingSelectedColor": "#ffffff"
|
||||
},
|
||||
"qmlView": {
|
||||
"gridAndInfoView": {
|
||||
"backgroundColor": "#2a2a2a",
|
||||
"cellColor": "#212121",
|
||||
"cellColorWithBackground": "#99212121",
|
||||
|
||||
@ -4,12 +4,11 @@
|
||||
"displayName": "Default Dark",
|
||||
"variant": "dark"
|
||||
},
|
||||
"defaultContentBackgroundColor": "#2a2a2a",
|
||||
"comicFlow": {
|
||||
"backgroundColor": "#111111",
|
||||
"textColor": "#888888"
|
||||
},
|
||||
"comicVine": {
|
||||
"metadataScraperDialog": {
|
||||
"contentTextColor": "#ffffff",
|
||||
"contentBackgroundColor": "#2b2b2b",
|
||||
"contentAltBackgroundColor": "#2e2e2e",
|
||||
@ -122,7 +121,7 @@
|
||||
"horizontalHandleHeight": 4,
|
||||
"verticalHandleWidth": 4
|
||||
},
|
||||
"treeView": {
|
||||
"navigationTree": {
|
||||
"textColor": "#dddfdf",
|
||||
"selectionBackgroundColor": "#2e2e2e",
|
||||
"scrollBackgroundColor": "#404040",
|
||||
@ -138,7 +137,7 @@
|
||||
"folderReadOverlayColor": "#222222",
|
||||
"folderReadOverlaySelectedColor": "#222222"
|
||||
},
|
||||
"tableView": {
|
||||
"comicsViewTable": {
|
||||
"alternateBackgroundColor": "#2e2e2e",
|
||||
"backgroundColor": "#2a2a2a",
|
||||
"headerBackgroundColor": "#2a2a2a",
|
||||
@ -155,7 +154,7 @@
|
||||
"starRatingColor": "#e9be0f",
|
||||
"starRatingSelectedColor": "#ffffff"
|
||||
},
|
||||
"qmlView": {
|
||||
"gridAndInfoView": {
|
||||
"backgroundColor": "#2a2a2a",
|
||||
"cellColor": "#212121",
|
||||
"cellColorWithBackground": "#99212121",
|
||||
|
||||
@ -4,12 +4,11 @@
|
||||
"displayName": "Default Light",
|
||||
"variant": "light"
|
||||
},
|
||||
"defaultContentBackgroundColor": "#ffffff",
|
||||
"comicFlow": {
|
||||
"backgroundColor": "#dcdcdc",
|
||||
"textColor": "#303030"
|
||||
},
|
||||
"comicVine": {
|
||||
"metadataScraperDialog": {
|
||||
"contentTextColor": "#000000",
|
||||
"contentBackgroundColor": "#ececec",
|
||||
"contentAltBackgroundColor": "#e0e0e0",
|
||||
@ -122,7 +121,7 @@
|
||||
"horizontalHandleHeight": 4,
|
||||
"verticalHandleWidth": 4
|
||||
},
|
||||
"treeView": {
|
||||
"navigationTree": {
|
||||
"textColor": "#000000",
|
||||
"selectionBackgroundColor": "#333133",
|
||||
"scrollBackgroundColor": "#e0e0e0",
|
||||
@ -138,7 +137,7 @@
|
||||
"folderReadOverlayColor": "#ffffff",
|
||||
"folderReadOverlaySelectedColor": "#161616"
|
||||
},
|
||||
"tableView": {
|
||||
"comicsViewTable": {
|
||||
"alternateBackgroundColor": "#f2f2f2",
|
||||
"backgroundColor": "#fafafa",
|
||||
"headerBackgroundColor": "#f5f5f5",
|
||||
@ -155,7 +154,7 @@
|
||||
"starRatingColor": "#e9be0f",
|
||||
"starRatingSelectedColor": "#ffffff"
|
||||
},
|
||||
"qmlView": {
|
||||
"gridAndInfoView": {
|
||||
"backgroundColor": "#f6f6f6",
|
||||
"cellColor": "#ffffff",
|
||||
"cellColorWithBackground": "#99ffffff",
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
#include "whats_new_dialog_theme.h"
|
||||
#include "theme_meta.h"
|
||||
|
||||
struct ComicVineThemeTemplates {
|
||||
struct MetadataScraperDialogThemeTemplates {
|
||||
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; }";
|
||||
@ -98,7 +98,7 @@ struct ComicFlowColors {
|
||||
QColor textColor;
|
||||
};
|
||||
|
||||
struct TableViewThemeTemplates {
|
||||
struct ComicsViewTableThemeTemplates {
|
||||
QString tableViewQSS = "QTableView {alternate-background-color: %1; background-color: %2; outline: 0px; border: none;}"
|
||||
"QTableCornerButton::section {background-color:%3; border:none; border-bottom:1px solid %4; border-right:1px solid qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 %5, stop: 1 %4);}"
|
||||
"QTableView::item {outline: 0px; border-bottom: %12px solid %6; border-top: %13px solid %7; padding-bottom:1px; color:%8;}"
|
||||
@ -107,7 +107,7 @@ struct TableViewThemeTemplates {
|
||||
"QHeaderView::section:vertical {border-bottom: 1px solid %6; border-top: 1px solid %7;}";
|
||||
};
|
||||
|
||||
struct TableViewTheme {
|
||||
struct ComicsViewTableTheme {
|
||||
QString tableViewQSS;
|
||||
QColor starRatingColor;
|
||||
QColor starRatingSelectedColor;
|
||||
@ -173,10 +173,10 @@ struct ImportWidgetTheme {
|
||||
QIcon coversToggleIcon;
|
||||
};
|
||||
|
||||
struct TreeViewThemeTemplates {
|
||||
struct NavigationTreeThemeTemplates {
|
||||
// Styled tree view template with custom scroll bars
|
||||
// %1 = text color, %2 = selection/hover background, %3 = scroll background, %4 = scroll handle, %5 = selected text color
|
||||
QString styledTreeViewQSS = "QTreeView {background-color:transparent; border: none; color:%1; outline:0; show-decoration-selected: 0;}"
|
||||
QString navigationTreeQSS = "QTreeView {background-color:transparent; border: none; color:%1; outline:0; show-decoration-selected: 0;}"
|
||||
"QTreeView::item:selected {background-color: %2; color:%5; font:bold;}"
|
||||
"QTreeView::item:hover {background-color:%2; color:%5; font:bold;}"
|
||||
"QTreeView::branch:selected {background-color:%2;}"
|
||||
@ -193,8 +193,8 @@ struct TreeViewThemeTemplates {
|
||||
"QTreeView::branch:open:has-children:selected:!has-siblings,QTreeView::branch:open:has-children:selected:has-siblings {border-image: none;image: url('%9');}";
|
||||
};
|
||||
|
||||
struct TreeViewTheme {
|
||||
QString treeViewQSS;
|
||||
struct NavigationTreeTheme {
|
||||
QString navigationTreeQSS;
|
||||
QColor folderIndicatorColor; // For incomplete folders and recently updated folders
|
||||
|
||||
// Branch indicator icon paths (used by QSS url())
|
||||
@ -208,8 +208,8 @@ struct TreeViewTheme {
|
||||
QIcon folderFinishedIcon;
|
||||
};
|
||||
|
||||
// QML view theme colors (used by GridComicsView, FolderContentView, InfoComicsView)
|
||||
struct QmlViewTheme {
|
||||
// Grid and info view theme colors (used by GridComicsView, FolderContentView, InfoComicsView)
|
||||
struct GridAndInfoViewTheme {
|
||||
// Grid colors
|
||||
QColor backgroundColor;
|
||||
QColor cellColor;
|
||||
@ -281,7 +281,7 @@ struct ContentSplitterTheme {
|
||||
|
||||
struct SidebarIconsTheme {
|
||||
// When true, use QFileIconProvider for folder icons and overlay folderReadOverlay for finished folders
|
||||
// When false, use the themed folderIcon and folderFinishedIcon from TreeViewTheme
|
||||
// When false, use the themed folderIcon and folderFinishedIcon from NavigationTreeTheme
|
||||
bool useSystemFolderIcons;
|
||||
QPixmap folderReadOverlay; // Tick overlay drawn on system folder icons when useSystemFolderIcons is true
|
||||
|
||||
@ -420,7 +420,7 @@ struct MainToolbarTheme {
|
||||
QString folderNameLabelQSS;
|
||||
};
|
||||
|
||||
struct ComicVineTheme {
|
||||
struct MetadataScraperDialogTheme {
|
||||
QString defaultLabelQSS;
|
||||
QString titleLabelQSS;
|
||||
QString coverLabelQSS;
|
||||
@ -457,10 +457,8 @@ struct Theme {
|
||||
ThemeMeta meta;
|
||||
QJsonObject sourceJson;
|
||||
|
||||
QColor defaultContentBackgroundColor;
|
||||
|
||||
ComicFlowColors comicFlow;
|
||||
ComicVineTheme comicVine;
|
||||
MetadataScraperDialogTheme metadataScraperDialog;
|
||||
HelpAboutDialogTheme helpAboutDialog;
|
||||
WhatsNewDialogTheme whatsNewDialog;
|
||||
EmptyContainerTheme emptyContainer;
|
||||
@ -469,9 +467,9 @@ struct Theme {
|
||||
LibraryItemTheme libraryItem;
|
||||
ImportWidgetTheme importWidget;
|
||||
ServerConfigDialogTheme serverConfigDialog;
|
||||
TreeViewTheme treeView;
|
||||
TableViewTheme tableView;
|
||||
QmlViewTheme qmlView;
|
||||
NavigationTreeTheme navigationTree;
|
||||
ComicsViewTableTheme comicsViewTable;
|
||||
GridAndInfoViewTheme gridAndInfoView;
|
||||
MainToolbarTheme mainToolbar;
|
||||
ContentSplitterTheme contentSplitter;
|
||||
ComicsViewToolbarTheme comicsViewToolbar;
|
||||
|
||||
@ -5,8 +5,8 @@
|
||||
#include "icon_utils.h"
|
||||
#include "yacreader_global.h"
|
||||
|
||||
struct ComicVineParams {
|
||||
ComicVineThemeTemplates t;
|
||||
struct MetadataScraperDialogParams {
|
||||
MetadataScraperDialogThemeTemplates t;
|
||||
|
||||
QColor contentTextColor;
|
||||
QColor contentBackgroundColor;
|
||||
@ -93,8 +93,8 @@ struct ImportWidgetParams {
|
||||
QColor iconCheckedColor;
|
||||
};
|
||||
|
||||
struct TreeViewParams {
|
||||
TreeViewThemeTemplates t;
|
||||
struct NavigationTreeParams {
|
||||
NavigationTreeThemeTemplates t;
|
||||
|
||||
QColor textColor;
|
||||
QColor selectionBackgroundColor;
|
||||
@ -116,8 +116,8 @@ struct TreeViewParams {
|
||||
QColor folderReadOverlaySelectedColor; // Tick/checkmark color for selected folder
|
||||
};
|
||||
|
||||
struct TableViewParams {
|
||||
TableViewThemeTemplates t;
|
||||
struct ComicsViewTableParams {
|
||||
ComicsViewTableThemeTemplates t;
|
||||
|
||||
QColor alternateBackgroundColor;
|
||||
QColor backgroundColor;
|
||||
@ -137,7 +137,7 @@ struct TableViewParams {
|
||||
QColor starRatingSelectedColor;
|
||||
};
|
||||
|
||||
struct QmlViewParams {
|
||||
struct GridAndInfoViewParams {
|
||||
// Grid colors
|
||||
QColor backgroundColor;
|
||||
QColor cellColor;
|
||||
@ -301,10 +301,9 @@ struct WhatsNewDialogParams {
|
||||
|
||||
struct ThemeParams {
|
||||
ThemeMeta meta;
|
||||
QColor defaultContentBackgroundColor;
|
||||
|
||||
ComicFlowColors comicFlowColors;
|
||||
ComicVineParams comicVineParams;
|
||||
MetadataScraperDialogParams metadataScraperDialogParams;
|
||||
HelpAboutDialogTheme helpAboutDialogParams;
|
||||
EmptyContainerParams emptyContainerParams;
|
||||
SidebarParams sidebarParams;
|
||||
@ -314,9 +313,9 @@ struct ThemeParams {
|
||||
ServerConfigDialogParams serverConfigDialogParams;
|
||||
MainToolbarParams mainToolbarParams;
|
||||
ContentSplitterParams contentSplitterParams;
|
||||
TreeViewParams treeViewParams;
|
||||
TableViewParams tableViewParams;
|
||||
QmlViewParams qmlViewParams;
|
||||
NavigationTreeParams navigationTreeParams;
|
||||
ComicsViewTableParams comicsViewTableParams;
|
||||
GridAndInfoViewParams gridAndInfoViewParams;
|
||||
ComicsViewToolbarParams comicsViewToolbarParams;
|
||||
SearchLineEditParams searchLineEditParams;
|
||||
ReadingListIconsParams readingListIconsParams;
|
||||
@ -330,63 +329,61 @@ Theme makeTheme(const ThemeParams ¶ms)
|
||||
{
|
||||
Theme theme;
|
||||
|
||||
theme.defaultContentBackgroundColor = params.defaultContentBackgroundColor;
|
||||
|
||||
// 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;
|
||||
// MetadataScraperDialog
|
||||
const auto &msd = params.metadataScraperDialogParams;
|
||||
const auto &t = msd.t;
|
||||
|
||||
auto recolor = [&](const QString &path, const QColor &color) {
|
||||
return recoloredSvgToThemeFile(path, color, params.meta.id);
|
||||
};
|
||||
|
||||
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(":/images/comic_vine/radioUnchecked.svg", cv.radioUncheckedColor), recoloredSvgToThemeFile(":/images/comic_vine/radioChecked.svg", cv.radioCheckedBackgroundColor, cv.radioCheckedIndicatorColor, params.meta.id));
|
||||
theme.comicVine.checkBoxQSS = t.checkBoxQSS.arg(cv.buttonTextColor.name(), cv.buttonBorderColor.name(), cv.buttonBackgroundColor.name(), recolor(":/images/comic_vine/checkBoxTick.svg", cv.checkBoxTickColor));
|
||||
theme.metadataScraperDialog.defaultLabelQSS = t.defaultLabelQSS.arg(msd.labelTextColor.name());
|
||||
theme.metadataScraperDialog.titleLabelQSS = t.titleLabelQSS.arg(msd.labelTextColor.name());
|
||||
theme.metadataScraperDialog.coverLabelQSS = t.coverLabelQSS.arg(msd.labelBackgroundColor.name(), msd.labelTextColor.name());
|
||||
theme.metadataScraperDialog.radioButtonQSS = t.radioButtonQSS.arg(msd.buttonTextColor.name(), recolor(":/images/comic_vine/radioUnchecked.svg", msd.radioUncheckedColor), recoloredSvgToThemeFile(":/images/comic_vine/radioChecked.svg", msd.radioCheckedBackgroundColor, msd.radioCheckedIndicatorColor, params.meta.id));
|
||||
theme.metadataScraperDialog.checkBoxQSS = t.checkBoxQSS.arg(msd.buttonTextColor.name(), msd.buttonBorderColor.name(), msd.buttonBackgroundColor.name(), recolor(":/images/comic_vine/checkBoxTick.svg", msd.checkBoxTickColor));
|
||||
|
||||
theme.comicVine.scraperLineEditTitleLabelQSS = t.scraperLineEditTitleLabelQSS.arg(cv.contentTextColor.name());
|
||||
theme.comicVine.scraperLineEditQSS = t.scraperLineEditQSS.arg(cv.contentAltBackgroundColor.name(), cv.contentTextColor.name(), "%1");
|
||||
theme.metadataScraperDialog.scraperLineEditTitleLabelQSS = t.scraperLineEditTitleLabelQSS.arg(msd.contentTextColor.name());
|
||||
theme.metadataScraperDialog.scraperLineEditQSS = t.scraperLineEditQSS.arg(msd.contentAltBackgroundColor.name(), msd.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.metadataScraperDialog.scraperToolButtonQSS = t.scraperToolButtonQSS.arg(msd.buttonBackgroundColor.name(), msd.buttonTextColor.name(), msd.toolButtonAccentColor.name());
|
||||
theme.metadataScraperDialog.scraperToolButtonSeparatorQSS = t.scraperToolButtonSeparatorQSS.arg(msd.toolButtonAccentColor.name());
|
||||
theme.metadataScraperDialog.scraperToolButtonFillColor = msd.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.metadataScraperDialog.scraperScrollLabelTextQSS = t.scraperScrollLabelTextQSS.arg(msd.contentBackgroundColor.name(), msd.contentTextColor.name(), msd.hyperlinkColor.name());
|
||||
theme.metadataScraperDialog.scraperScrollLabelScrollAreaQSS = t.scraperScrollLabelScrollAreaQSS.arg(msd.contentBackgroundColor.name(), msd.tableScrollHandleColor.name(), msd.tableScrollBackgroundColor.name());
|
||||
|
||||
theme.comicVine.scraperTableViewQSS = t.scraperTableViewQSS
|
||||
.arg(cv.tableHeaderTextColor.name(),
|
||||
cv.tableAltBackgroundColor.name(),
|
||||
cv.tableBackgroundColor.name(),
|
||||
cv.tableSelectedColor.name(),
|
||||
cv.tableHeaderBackgroundColor.name(),
|
||||
cv.tableHeaderBorderColor.name(),
|
||||
cv.tableHeaderTextColor.name(),
|
||||
cv.tableSectionBorderDark.name(),
|
||||
cv.tableSectionBorderLight.name(),
|
||||
cv.tableScrollHandleColor.name(),
|
||||
cv.tableScrollBackgroundColor.name(),
|
||||
recolor(":/images/comic_vine/downArrow.svg", cv.downArrowColor),
|
||||
recolor(":/images/comic_vine/upArrow.svg", cv.upArrowColor),
|
||||
cv.tableHeaderGradientColor.name());
|
||||
theme.metadataScraperDialog.scraperTableViewQSS = t.scraperTableViewQSS
|
||||
.arg(msd.tableHeaderTextColor.name(),
|
||||
msd.tableAltBackgroundColor.name(),
|
||||
msd.tableBackgroundColor.name(),
|
||||
msd.tableSelectedColor.name(),
|
||||
msd.tableHeaderBackgroundColor.name(),
|
||||
msd.tableHeaderBorderColor.name(),
|
||||
msd.tableHeaderTextColor.name(),
|
||||
msd.tableSectionBorderDark.name(),
|
||||
msd.tableSectionBorderLight.name(),
|
||||
msd.tableScrollHandleColor.name(),
|
||||
msd.tableScrollBackgroundColor.name(),
|
||||
recolor(":/images/comic_vine/downArrow.svg", msd.downArrowColor),
|
||||
recolor(":/images/comic_vine/upArrow.svg", msd.upArrowColor),
|
||||
msd.tableHeaderGradientColor.name());
|
||||
|
||||
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.metadataScraperDialog.dialogQSS = t.dialogQSS.arg(msd.dialogBackgroundColor.name());
|
||||
theme.metadataScraperDialog.dialogButtonsQSS = t.dialogButtonsQSS.arg(msd.buttonBorderColor.name(), msd.buttonBackgroundColor.name(), msd.buttonTextColor.name());
|
||||
|
||||
theme.comicVine.busyIndicatorColor = cv.busyIndicatorColor;
|
||||
theme.metadataScraperDialog.busyIndicatorColor = msd.busyIndicatorColor;
|
||||
|
||||
theme.comicVine.nextPageIcon = { QIcon(recolor(t.nextPageIcon, cv.navIconColor)), t.pageIconSize };
|
||||
theme.comicVine.previousPageIcon = { QIcon(recolor(t.previousPageIcon, cv.navIconColor)), t.pageIconSize };
|
||||
theme.metadataScraperDialog.nextPageIcon = { QIcon(recolor(t.nextPageIcon, msd.navIconColor)), t.pageIconSize };
|
||||
theme.metadataScraperDialog.previousPageIcon = { QIcon(recolor(t.previousPageIcon, msd.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 };
|
||||
theme.metadataScraperDialog.rowUpIcon = { QIcon(recolor(t.rowUpIcon, msd.rowIconColor)), t.rowIconSize };
|
||||
theme.metadataScraperDialog.rowDownIcon = { QIcon(recolor(t.rowDownIcon, msd.rowIconColor)), t.rowIconSize };
|
||||
|
||||
// HelpAboutDialog
|
||||
theme.helpAboutDialog = params.helpAboutDialogParams;
|
||||
@ -470,55 +467,54 @@ Theme makeTheme(const ThemeParams ¶ms)
|
||||
}
|
||||
// end ImportWidget
|
||||
|
||||
// TableView
|
||||
const auto &tav = params.tableViewParams;
|
||||
const auto &tavt = tav.t;
|
||||
theme.tableView.tableViewQSS = tavt.tableViewQSS
|
||||
.arg(tav.alternateBackgroundColor.name(),
|
||||
tav.backgroundColor.name(),
|
||||
tav.headerBackgroundColor.name(),
|
||||
tav.headerBorderColor.name(),
|
||||
tav.headerGradientColor.name(),
|
||||
tav.itemBorderBottomColor.name(),
|
||||
tav.itemBorderTopColor.name(),
|
||||
tav.itemTextColor.name(),
|
||||
tav.selectedColor.name(),
|
||||
tav.selectedTextColor.name(),
|
||||
tav.headerTextColor.name(),
|
||||
QString::number(tav.itemBorderBottomWidth),
|
||||
QString::number(tav.itemBorderTopWidth));
|
||||
theme.tableView.starRatingColor = tav.starRatingColor;
|
||||
theme.tableView.starRatingSelectedColor = tav.starRatingSelectedColor;
|
||||
// end TableView
|
||||
// ComicsViewTable
|
||||
const auto &cvta = params.comicsViewTableParams;
|
||||
theme.comicsViewTable.tableViewQSS = cvta.t.tableViewQSS
|
||||
.arg(cvta.alternateBackgroundColor.name(),
|
||||
cvta.backgroundColor.name(),
|
||||
cvta.headerBackgroundColor.name(),
|
||||
cvta.headerBorderColor.name(),
|
||||
cvta.headerGradientColor.name(),
|
||||
cvta.itemBorderBottomColor.name(),
|
||||
cvta.itemBorderTopColor.name(),
|
||||
cvta.itemTextColor.name(),
|
||||
cvta.selectedColor.name(),
|
||||
cvta.selectedTextColor.name(),
|
||||
cvta.headerTextColor.name(),
|
||||
QString::number(cvta.itemBorderBottomWidth),
|
||||
QString::number(cvta.itemBorderTopWidth));
|
||||
theme.comicsViewTable.starRatingColor = cvta.starRatingColor;
|
||||
theme.comicsViewTable.starRatingSelectedColor = cvta.starRatingSelectedColor;
|
||||
// end ComicsViewTable
|
||||
|
||||
// QmlView
|
||||
const auto &qv = params.qmlViewParams;
|
||||
theme.qmlView.backgroundColor = qv.backgroundColor;
|
||||
theme.qmlView.cellColor = qv.cellColor;
|
||||
theme.qmlView.cellColorWithBackground = qv.cellColorWithBackground;
|
||||
theme.qmlView.selectedColor = qv.selectedColor;
|
||||
theme.qmlView.selectedBorderColor = qv.selectedBorderColor;
|
||||
theme.qmlView.borderColor = qv.borderColor;
|
||||
theme.qmlView.titleColor = qv.titleColor;
|
||||
theme.qmlView.textColor = qv.textColor;
|
||||
theme.qmlView.showDropShadow = qv.showDropShadow;
|
||||
theme.qmlView.infoBackgroundColor = qv.infoBackgroundColor;
|
||||
theme.qmlView.topShadow = recoloredSvgToThemeFile(":/qml/info-top-shadow.svg", qv.infoBackgroundColor, qv.infoBorderColor, qv.infoShadowColor, params.meta.id);
|
||||
theme.qmlView.infoShadow = recoloredSvgToThemeFile(":/qml/info-shadow.svg", qv.infoBackgroundColor, qv.infoBorderColor, qv.infoShadowColor, params.meta.id);
|
||||
theme.qmlView.infoIndicator = recoloredSvgToThemeFile(":/qml/info-indicator.svg", qv.infoBackgroundColor, qv.infoBorderColor, qv.infoShadowColor, params.meta.id);
|
||||
theme.qmlView.infoTextColor = qv.infoTextColor;
|
||||
theme.qmlView.infoTitleColor = qv.infoTitleColor;
|
||||
theme.qmlView.ratingUnselectedColor = qv.ratingUnselectedColor;
|
||||
theme.qmlView.ratingSelectedColor = qv.ratingSelectedColor;
|
||||
theme.qmlView.favUncheckedColor = qv.favUncheckedColor;
|
||||
theme.qmlView.favCheckedColor = qv.favCheckedColor;
|
||||
theme.qmlView.readTickUncheckedColor = qv.readTickUncheckedColor;
|
||||
theme.qmlView.readTickCheckedColor = qv.readTickCheckedColor;
|
||||
theme.qmlView.currentComicBackgroundColor = qv.currentComicBackgroundColor;
|
||||
theme.qmlView.continueReadingBackgroundColor = qv.continueReadingBackgroundColor;
|
||||
theme.qmlView.continueReadingColor = qv.continueReadingColor;
|
||||
theme.qmlView.backgroundBlurOverlayColor = qv.backgroundBlurOverlayColor;
|
||||
// end QmlView
|
||||
// GridAndInfoView
|
||||
const auto &giv = params.gridAndInfoViewParams;
|
||||
theme.gridAndInfoView.backgroundColor = giv.backgroundColor;
|
||||
theme.gridAndInfoView.cellColor = giv.cellColor;
|
||||
theme.gridAndInfoView.cellColorWithBackground = giv.cellColorWithBackground;
|
||||
theme.gridAndInfoView.selectedColor = giv.selectedColor;
|
||||
theme.gridAndInfoView.selectedBorderColor = giv.selectedBorderColor;
|
||||
theme.gridAndInfoView.borderColor = giv.borderColor;
|
||||
theme.gridAndInfoView.titleColor = giv.titleColor;
|
||||
theme.gridAndInfoView.textColor = giv.textColor;
|
||||
theme.gridAndInfoView.showDropShadow = giv.showDropShadow;
|
||||
theme.gridAndInfoView.infoBackgroundColor = giv.infoBackgroundColor;
|
||||
theme.gridAndInfoView.topShadow = recoloredSvgToThemeFile(":/qml/info-top-shadow.svg", giv.infoBackgroundColor, giv.infoBorderColor, giv.infoShadowColor, params.meta.id);
|
||||
theme.gridAndInfoView.infoShadow = recoloredSvgToThemeFile(":/qml/info-shadow.svg", giv.infoBackgroundColor, giv.infoBorderColor, giv.infoShadowColor, params.meta.id);
|
||||
theme.gridAndInfoView.infoIndicator = recoloredSvgToThemeFile(":/qml/info-indicator.svg", giv.infoBackgroundColor, giv.infoBorderColor, giv.infoShadowColor, params.meta.id);
|
||||
theme.gridAndInfoView.infoTextColor = giv.infoTextColor;
|
||||
theme.gridAndInfoView.infoTitleColor = giv.infoTitleColor;
|
||||
theme.gridAndInfoView.ratingUnselectedColor = giv.ratingUnselectedColor;
|
||||
theme.gridAndInfoView.ratingSelectedColor = giv.ratingSelectedColor;
|
||||
theme.gridAndInfoView.favUncheckedColor = giv.favUncheckedColor;
|
||||
theme.gridAndInfoView.favCheckedColor = giv.favCheckedColor;
|
||||
theme.gridAndInfoView.readTickUncheckedColor = giv.readTickUncheckedColor;
|
||||
theme.gridAndInfoView.readTickCheckedColor = giv.readTickCheckedColor;
|
||||
theme.gridAndInfoView.currentComicBackgroundColor = giv.currentComicBackgroundColor;
|
||||
theme.gridAndInfoView.continueReadingBackgroundColor = giv.continueReadingBackgroundColor;
|
||||
theme.gridAndInfoView.continueReadingColor = giv.continueReadingColor;
|
||||
theme.gridAndInfoView.backgroundBlurOverlayColor = giv.backgroundBlurOverlayColor;
|
||||
// end GridAndInfoView
|
||||
|
||||
// MainToolbar
|
||||
const auto &mt = params.mainToolbarParams;
|
||||
@ -600,7 +596,7 @@ Theme makeTheme(const ThemeParams ¶ms)
|
||||
// System folder icons flag and overlay
|
||||
theme.sidebarIcons.useSystemFolderIcons = si.useSystemFolderIcons;
|
||||
if (si.useSystemFolderIcons) {
|
||||
const QString overlayPath = recoloredSvgToThemeFile(":/images/sidebar/folder_read_overlay.svg", params.treeViewParams.folderReadOverlayColor, params.meta.id);
|
||||
const QString overlayPath = recoloredSvgToThemeFile(":/images/sidebar/folder_read_overlay.svg", params.navigationTreeParams.folderReadOverlayColor, params.meta.id);
|
||||
theme.sidebarIcons.folderReadOverlay = QPixmap(overlayPath);
|
||||
}
|
||||
|
||||
@ -642,43 +638,43 @@ Theme makeTheme(const ThemeParams ¶ms)
|
||||
theme.libraryItem.libraryOptionsIcon = QIcon(libraryOptionsPath);
|
||||
// end LibraryItem
|
||||
|
||||
// TreeView
|
||||
const auto &tv = params.treeViewParams;
|
||||
// NavigationTree
|
||||
const auto &nt = params.navigationTreeParams;
|
||||
|
||||
// Branch indicator icons — own colors, independent of the sidebar icon color
|
||||
theme.treeView.branchClosedIconPath = recoloredSvgToThemeFile(":/images/sidebar/branch-closed.svg", tv.branchIndicatorColor, params.meta.id);
|
||||
theme.treeView.branchOpenIconPath = recoloredSvgToThemeFile(":/images/sidebar/branch-open.svg", tv.branchIndicatorColor, params.meta.id);
|
||||
theme.treeView.branchClosedIconSelectedPath = recoloredSvgToThemeFile(":/images/sidebar/branch-closed.svg", tv.branchIndicatorSelectedColor, params.meta.id, { .suffix = "_selected" });
|
||||
theme.treeView.branchOpenIconSelectedPath = recoloredSvgToThemeFile(":/images/sidebar/branch-open.svg", tv.branchIndicatorSelectedColor, params.meta.id, { .suffix = "_selected" });
|
||||
theme.navigationTree.branchClosedIconPath = recoloredSvgToThemeFile(":/images/sidebar/branch-closed.svg", nt.branchIndicatorColor, params.meta.id);
|
||||
theme.navigationTree.branchOpenIconPath = recoloredSvgToThemeFile(":/images/sidebar/branch-open.svg", nt.branchIndicatorColor, params.meta.id);
|
||||
theme.navigationTree.branchClosedIconSelectedPath = recoloredSvgToThemeFile(":/images/sidebar/branch-closed.svg", nt.branchIndicatorSelectedColor, params.meta.id, { .suffix = "_selected" });
|
||||
theme.navigationTree.branchOpenIconSelectedPath = recoloredSvgToThemeFile(":/images/sidebar/branch-open.svg", nt.branchIndicatorSelectedColor, params.meta.id, { .suffix = "_selected" });
|
||||
|
||||
theme.treeView.treeViewQSS = tv.t.styledTreeViewQSS
|
||||
.arg(tv.textColor.name(),
|
||||
tv.selectionBackgroundColor.name(),
|
||||
tv.scrollBackgroundColor.name(),
|
||||
tv.scrollHandleColor.name(),
|
||||
tv.selectedTextColor.name(),
|
||||
theme.treeView.branchClosedIconPath,
|
||||
theme.treeView.branchOpenIconPath,
|
||||
theme.treeView.branchClosedIconSelectedPath,
|
||||
theme.treeView.branchOpenIconSelectedPath);
|
||||
theme.treeView.folderIndicatorColor = tv.folderIndicatorColor;
|
||||
theme.navigationTree.navigationTreeQSS = nt.t.navigationTreeQSS
|
||||
.arg(nt.textColor.name(),
|
||||
nt.selectionBackgroundColor.name(),
|
||||
nt.scrollBackgroundColor.name(),
|
||||
nt.scrollHandleColor.name(),
|
||||
nt.selectedTextColor.name(),
|
||||
theme.navigationTree.branchClosedIconPath,
|
||||
theme.navigationTree.branchOpenIconPath,
|
||||
theme.navigationTree.branchClosedIconSelectedPath,
|
||||
theme.navigationTree.branchOpenIconSelectedPath);
|
||||
theme.navigationTree.folderIndicatorColor = nt.folderIndicatorColor;
|
||||
|
||||
// Folder icon — normal and selected states with independent colors
|
||||
{
|
||||
const QString normalPath = recoloredSvgToThemeFile(":/images/sidebar/folder.svg", tv.folderIconColor, tv.folderIconShadowColor, params.meta.id);
|
||||
const QString selectedPath = recoloredSvgToThemeFile(":/images/sidebar/folder.svg", tv.folderIconSelectedColor, tv.folderIconSelectedShadowColor, params.meta.id, { .suffix = "_selected" });
|
||||
theme.treeView.folderIcon.addFile(normalPath, QSize(), QIcon::Normal, QIcon::Off);
|
||||
theme.treeView.folderIcon.addFile(selectedPath, QSize(), QIcon::Selected, QIcon::Off);
|
||||
const QString normalPath = recoloredSvgToThemeFile(":/images/sidebar/folder.svg", nt.folderIconColor, nt.folderIconShadowColor, params.meta.id);
|
||||
const QString selectedPath = recoloredSvgToThemeFile(":/images/sidebar/folder.svg", nt.folderIconSelectedColor, nt.folderIconSelectedShadowColor, params.meta.id, { .suffix = "_selected" });
|
||||
theme.navigationTree.folderIcon.addFile(normalPath, QSize(), QIcon::Normal, QIcon::Off);
|
||||
theme.navigationTree.folderIcon.addFile(selectedPath, QSize(), QIcon::Selected, QIcon::Off);
|
||||
}
|
||||
|
||||
// Folder finished icon — same but with tick (#ff0) recolored independently for each state
|
||||
{
|
||||
const QString normalPath = recoloredSvgToThemeFile(":/images/sidebar/folder_finished.svg", tv.folderIconColor, tv.folderIconShadowColor, tv.folderReadOverlayColor, params.meta.id);
|
||||
const QString selectedPath = recoloredSvgToThemeFile(":/images/sidebar/folder_finished.svg", tv.folderIconSelectedColor, tv.folderIconSelectedShadowColor, tv.folderReadOverlaySelectedColor, params.meta.id, { .suffix = "_selected" });
|
||||
theme.treeView.folderFinishedIcon.addFile(normalPath, QSize(), QIcon::Normal, QIcon::Off);
|
||||
theme.treeView.folderFinishedIcon.addFile(selectedPath, QSize(), QIcon::Selected, QIcon::Off);
|
||||
const QString normalPath = recoloredSvgToThemeFile(":/images/sidebar/folder_finished.svg", nt.folderIconColor, nt.folderIconShadowColor, nt.folderReadOverlayColor, params.meta.id);
|
||||
const QString selectedPath = recoloredSvgToThemeFile(":/images/sidebar/folder_finished.svg", nt.folderIconSelectedColor, nt.folderIconSelectedShadowColor, nt.folderReadOverlaySelectedColor, params.meta.id, { .suffix = "_selected" });
|
||||
theme.navigationTree.folderFinishedIcon.addFile(normalPath, QSize(), QIcon::Normal, QIcon::Off);
|
||||
theme.navigationTree.folderFinishedIcon.addFile(selectedPath, QSize(), QIcon::Selected, QIcon::Off);
|
||||
}
|
||||
// end TreeView
|
||||
// end NavigationTree
|
||||
|
||||
// ContentSplitter
|
||||
const auto &cs = params.contentSplitterParams;
|
||||
@ -873,53 +869,47 @@ Theme makeTheme(const QJsonObject &json)
|
||||
{
|
||||
ThemeParams p;
|
||||
|
||||
if (json.contains("defaultContentBackgroundColor")) {
|
||||
QColor c(json["defaultContentBackgroundColor"].toString());
|
||||
if (c.isValid())
|
||||
p.defaultContentBackgroundColor = c;
|
||||
}
|
||||
|
||||
if (json.contains("comicFlow")) {
|
||||
const auto o = json["comicFlow"].toObject();
|
||||
p.comicFlowColors.backgroundColor = colorFromJson(o, "backgroundColor", p.comicFlowColors.backgroundColor);
|
||||
p.comicFlowColors.textColor = colorFromJson(o, "textColor", p.comicFlowColors.textColor);
|
||||
}
|
||||
|
||||
if (json.contains("comicVine")) {
|
||||
const auto o = json["comicVine"].toObject();
|
||||
auto &cv = p.comicVineParams;
|
||||
cv.contentTextColor = colorFromJson(o, "contentTextColor", cv.contentTextColor);
|
||||
cv.contentBackgroundColor = colorFromJson(o, "contentBackgroundColor", cv.contentBackgroundColor);
|
||||
cv.contentAltBackgroundColor = colorFromJson(o, "contentAltBackgroundColor", cv.contentAltBackgroundColor);
|
||||
cv.dialogBackgroundColor = colorFromJson(o, "dialogBackgroundColor", cv.dialogBackgroundColor);
|
||||
cv.tableBackgroundColor = colorFromJson(o, "tableBackgroundColor", cv.tableBackgroundColor);
|
||||
cv.tableAltBackgroundColor = colorFromJson(o, "tableAltBackgroundColor", cv.tableAltBackgroundColor);
|
||||
cv.tableBorderColor = colorFromJson(o, "tableBorderColor", cv.tableBorderColor);
|
||||
cv.tableSelectedColor = colorFromJson(o, "tableSelectedColor", cv.tableSelectedColor);
|
||||
cv.tableHeaderBackgroundColor = colorFromJson(o, "tableHeaderBackgroundColor", cv.tableHeaderBackgroundColor);
|
||||
cv.tableHeaderGradientColor = colorFromJson(o, "tableHeaderGradientColor", cv.tableHeaderGradientColor);
|
||||
cv.tableHeaderBorderColor = colorFromJson(o, "tableHeaderBorderColor", cv.tableHeaderBorderColor);
|
||||
cv.tableHeaderTextColor = colorFromJson(o, "tableHeaderTextColor", cv.tableHeaderTextColor);
|
||||
cv.tableScrollHandleColor = colorFromJson(o, "tableScrollHandleColor", cv.tableScrollHandleColor);
|
||||
cv.tableScrollBackgroundColor = colorFromJson(o, "tableScrollBackgroundColor", cv.tableScrollBackgroundColor);
|
||||
cv.tableSectionBorderLight = colorFromJson(o, "tableSectionBorderLight", cv.tableSectionBorderLight);
|
||||
cv.tableSectionBorderDark = colorFromJson(o, "tableSectionBorderDark", cv.tableSectionBorderDark);
|
||||
cv.labelTextColor = colorFromJson(o, "labelTextColor", cv.labelTextColor);
|
||||
cv.labelBackgroundColor = colorFromJson(o, "labelBackgroundColor", cv.labelBackgroundColor);
|
||||
cv.hyperlinkColor = colorFromJson(o, "hyperlinkColor", cv.hyperlinkColor);
|
||||
cv.buttonBackgroundColor = colorFromJson(o, "buttonBackgroundColor", cv.buttonBackgroundColor);
|
||||
cv.buttonTextColor = colorFromJson(o, "buttonTextColor", cv.buttonTextColor);
|
||||
cv.buttonBorderColor = colorFromJson(o, "buttonBorderColor", cv.buttonBorderColor);
|
||||
cv.radioUncheckedColor = colorFromJson(o, "radioUncheckedColor", cv.radioUncheckedColor);
|
||||
cv.radioCheckedBackgroundColor = colorFromJson(o, "radioCheckedBackgroundColor", cv.radioCheckedBackgroundColor);
|
||||
cv.radioCheckedIndicatorColor = colorFromJson(o, "radioCheckedIndicatorColor", cv.radioCheckedIndicatorColor);
|
||||
cv.checkBoxTickColor = colorFromJson(o, "checkBoxTickColor", cv.checkBoxTickColor);
|
||||
cv.toolButtonAccentColor = colorFromJson(o, "toolButtonAccentColor", cv.toolButtonAccentColor);
|
||||
cv.downArrowColor = colorFromJson(o, "downArrowColor", cv.downArrowColor);
|
||||
cv.upArrowColor = colorFromJson(o, "upArrowColor", cv.upArrowColor);
|
||||
cv.busyIndicatorColor = colorFromJson(o, "busyIndicatorColor", cv.busyIndicatorColor);
|
||||
cv.navIconColor = colorFromJson(o, "navIconColor", cv.navIconColor);
|
||||
cv.rowIconColor = colorFromJson(o, "rowIconColor", cv.rowIconColor);
|
||||
if (json.contains("metadataScraperDialog")) {
|
||||
const auto o = json["metadataScraperDialog"].toObject();
|
||||
auto &msd = p.metadataScraperDialogParams;
|
||||
msd.contentTextColor = colorFromJson(o, "contentTextColor", msd.contentTextColor);
|
||||
msd.contentBackgroundColor = colorFromJson(o, "contentBackgroundColor", msd.contentBackgroundColor);
|
||||
msd.contentAltBackgroundColor = colorFromJson(o, "contentAltBackgroundColor", msd.contentAltBackgroundColor);
|
||||
msd.dialogBackgroundColor = colorFromJson(o, "dialogBackgroundColor", msd.dialogBackgroundColor);
|
||||
msd.tableBackgroundColor = colorFromJson(o, "tableBackgroundColor", msd.tableBackgroundColor);
|
||||
msd.tableAltBackgroundColor = colorFromJson(o, "tableAltBackgroundColor", msd.tableAltBackgroundColor);
|
||||
msd.tableBorderColor = colorFromJson(o, "tableBorderColor", msd.tableBorderColor);
|
||||
msd.tableSelectedColor = colorFromJson(o, "tableSelectedColor", msd.tableSelectedColor);
|
||||
msd.tableHeaderBackgroundColor = colorFromJson(o, "tableHeaderBackgroundColor", msd.tableHeaderBackgroundColor);
|
||||
msd.tableHeaderGradientColor = colorFromJson(o, "tableHeaderGradientColor", msd.tableHeaderGradientColor);
|
||||
msd.tableHeaderBorderColor = colorFromJson(o, "tableHeaderBorderColor", msd.tableHeaderBorderColor);
|
||||
msd.tableHeaderTextColor = colorFromJson(o, "tableHeaderTextColor", msd.tableHeaderTextColor);
|
||||
msd.tableScrollHandleColor = colorFromJson(o, "tableScrollHandleColor", msd.tableScrollHandleColor);
|
||||
msd.tableScrollBackgroundColor = colorFromJson(o, "tableScrollBackgroundColor", msd.tableScrollBackgroundColor);
|
||||
msd.tableSectionBorderLight = colorFromJson(o, "tableSectionBorderLight", msd.tableSectionBorderLight);
|
||||
msd.tableSectionBorderDark = colorFromJson(o, "tableSectionBorderDark", msd.tableSectionBorderDark);
|
||||
msd.labelTextColor = colorFromJson(o, "labelTextColor", msd.labelTextColor);
|
||||
msd.labelBackgroundColor = colorFromJson(o, "labelBackgroundColor", msd.labelBackgroundColor);
|
||||
msd.hyperlinkColor = colorFromJson(o, "hyperlinkColor", msd.hyperlinkColor);
|
||||
msd.buttonBackgroundColor = colorFromJson(o, "buttonBackgroundColor", msd.buttonBackgroundColor);
|
||||
msd.buttonTextColor = colorFromJson(o, "buttonTextColor", msd.buttonTextColor);
|
||||
msd.buttonBorderColor = colorFromJson(o, "buttonBorderColor", msd.buttonBorderColor);
|
||||
msd.radioUncheckedColor = colorFromJson(o, "radioUncheckedColor", msd.radioUncheckedColor);
|
||||
msd.radioCheckedBackgroundColor = colorFromJson(o, "radioCheckedBackgroundColor", msd.radioCheckedBackgroundColor);
|
||||
msd.radioCheckedIndicatorColor = colorFromJson(o, "radioCheckedIndicatorColor", msd.radioCheckedIndicatorColor);
|
||||
msd.checkBoxTickColor = colorFromJson(o, "checkBoxTickColor", msd.checkBoxTickColor);
|
||||
msd.toolButtonAccentColor = colorFromJson(o, "toolButtonAccentColor", msd.toolButtonAccentColor);
|
||||
msd.downArrowColor = colorFromJson(o, "downArrowColor", msd.downArrowColor);
|
||||
msd.upArrowColor = colorFromJson(o, "upArrowColor", msd.upArrowColor);
|
||||
msd.busyIndicatorColor = colorFromJson(o, "busyIndicatorColor", msd.busyIndicatorColor);
|
||||
msd.navIconColor = colorFromJson(o, "navIconColor", msd.navIconColor);
|
||||
msd.rowIconColor = colorFromJson(o, "rowIconColor", msd.rowIconColor);
|
||||
}
|
||||
|
||||
if (json.contains("helpAboutDialog")) {
|
||||
@ -1034,73 +1024,73 @@ Theme makeTheme(const QJsonObject &json)
|
||||
cs.verticalHandleWidth = o["verticalHandleWidth"].toInt(cs.verticalHandleWidth);
|
||||
}
|
||||
|
||||
if (json.contains("treeView")) {
|
||||
const auto o = json["treeView"].toObject();
|
||||
auto &tv = p.treeViewParams;
|
||||
tv.textColor = colorFromJson(o, "textColor", tv.textColor);
|
||||
tv.selectionBackgroundColor = colorFromJson(o, "selectionBackgroundColor", tv.selectionBackgroundColor);
|
||||
tv.scrollBackgroundColor = colorFromJson(o, "scrollBackgroundColor", tv.scrollBackgroundColor);
|
||||
tv.scrollHandleColor = colorFromJson(o, "scrollHandleColor", tv.scrollHandleColor);
|
||||
tv.selectedTextColor = colorFromJson(o, "selectedTextColor", tv.selectedTextColor);
|
||||
tv.folderIndicatorColor = colorFromJson(o, "folderIndicatorColor", tv.folderIndicatorColor);
|
||||
tv.branchIndicatorColor = colorFromJson(o, "branchIndicatorColor", tv.branchIndicatorColor);
|
||||
tv.branchIndicatorSelectedColor = colorFromJson(o, "branchIndicatorSelectedColor", tv.branchIndicatorSelectedColor);
|
||||
tv.folderIconColor = colorFromJson(o, "folderIconColor", tv.folderIconColor);
|
||||
tv.folderIconShadowColor = colorFromJson(o, "folderIconShadowColor", tv.folderIconShadowColor);
|
||||
tv.folderIconSelectedColor = colorFromJson(o, "folderIconSelectedColor", tv.folderIconSelectedColor);
|
||||
tv.folderIconSelectedShadowColor = colorFromJson(o, "folderIconSelectedShadowColor", tv.folderIconSelectedShadowColor);
|
||||
tv.folderReadOverlayColor = colorFromJson(o, "folderReadOverlayColor", tv.folderReadOverlayColor);
|
||||
tv.folderReadOverlaySelectedColor = colorFromJson(o, "folderReadOverlaySelectedColor", tv.folderReadOverlaySelectedColor);
|
||||
if (json.contains("navigationTree")) {
|
||||
const auto o = json["navigationTree"].toObject();
|
||||
auto &nt = p.navigationTreeParams;
|
||||
nt.textColor = colorFromJson(o, "textColor", nt.textColor);
|
||||
nt.selectionBackgroundColor = colorFromJson(o, "selectionBackgroundColor", nt.selectionBackgroundColor);
|
||||
nt.scrollBackgroundColor = colorFromJson(o, "scrollBackgroundColor", nt.scrollBackgroundColor);
|
||||
nt.scrollHandleColor = colorFromJson(o, "scrollHandleColor", nt.scrollHandleColor);
|
||||
nt.selectedTextColor = colorFromJson(o, "selectedTextColor", nt.selectedTextColor);
|
||||
nt.folderIndicatorColor = colorFromJson(o, "folderIndicatorColor", nt.folderIndicatorColor);
|
||||
nt.branchIndicatorColor = colorFromJson(o, "branchIndicatorColor", nt.branchIndicatorColor);
|
||||
nt.branchIndicatorSelectedColor = colorFromJson(o, "branchIndicatorSelectedColor", nt.branchIndicatorSelectedColor);
|
||||
nt.folderIconColor = colorFromJson(o, "folderIconColor", nt.folderIconColor);
|
||||
nt.folderIconShadowColor = colorFromJson(o, "folderIconShadowColor", nt.folderIconShadowColor);
|
||||
nt.folderIconSelectedColor = colorFromJson(o, "folderIconSelectedColor", nt.folderIconSelectedColor);
|
||||
nt.folderIconSelectedShadowColor = colorFromJson(o, "folderIconSelectedShadowColor", nt.folderIconSelectedShadowColor);
|
||||
nt.folderReadOverlayColor = colorFromJson(o, "folderReadOverlayColor", nt.folderReadOverlayColor);
|
||||
nt.folderReadOverlaySelectedColor = colorFromJson(o, "folderReadOverlaySelectedColor", nt.folderReadOverlaySelectedColor);
|
||||
}
|
||||
|
||||
if (json.contains("tableView")) {
|
||||
const auto o = json["tableView"].toObject();
|
||||
auto &tbv = p.tableViewParams;
|
||||
tbv.alternateBackgroundColor = colorFromJson(o, "alternateBackgroundColor", tbv.alternateBackgroundColor);
|
||||
tbv.backgroundColor = colorFromJson(o, "backgroundColor", tbv.backgroundColor);
|
||||
tbv.headerBackgroundColor = colorFromJson(o, "headerBackgroundColor", tbv.headerBackgroundColor);
|
||||
tbv.headerBorderColor = colorFromJson(o, "headerBorderColor", tbv.headerBorderColor);
|
||||
tbv.headerGradientColor = colorFromJson(o, "headerGradientColor", tbv.headerGradientColor);
|
||||
tbv.itemBorderBottomColor = colorFromJson(o, "itemBorderBottomColor", tbv.itemBorderBottomColor);
|
||||
tbv.itemBorderTopColor = colorFromJson(o, "itemBorderTopColor", tbv.itemBorderTopColor);
|
||||
tbv.itemBorderBottomWidth = o["itemBorderBottomWidth"].toInt(tbv.itemBorderBottomWidth);
|
||||
tbv.itemBorderTopWidth = o["itemBorderTopWidth"].toInt(tbv.itemBorderTopWidth);
|
||||
tbv.itemTextColor = colorFromJson(o, "itemTextColor", tbv.itemTextColor);
|
||||
tbv.selectedColor = colorFromJson(o, "selectedColor", tbv.selectedColor);
|
||||
tbv.selectedTextColor = colorFromJson(o, "selectedTextColor", tbv.selectedTextColor);
|
||||
tbv.headerTextColor = colorFromJson(o, "headerTextColor", tbv.headerTextColor);
|
||||
tbv.starRatingColor = colorFromJson(o, "starRatingColor", tbv.starRatingColor);
|
||||
tbv.starRatingSelectedColor = colorFromJson(o, "starRatingSelectedColor", tbv.starRatingSelectedColor);
|
||||
if (json.contains("comicsViewTable")) {
|
||||
const auto o = json["comicsViewTable"].toObject();
|
||||
auto &cvta = p.comicsViewTableParams;
|
||||
cvta.alternateBackgroundColor = colorFromJson(o, "alternateBackgroundColor", cvta.alternateBackgroundColor);
|
||||
cvta.backgroundColor = colorFromJson(o, "backgroundColor", cvta.backgroundColor);
|
||||
cvta.headerBackgroundColor = colorFromJson(o, "headerBackgroundColor", cvta.headerBackgroundColor);
|
||||
cvta.headerBorderColor = colorFromJson(o, "headerBorderColor", cvta.headerBorderColor);
|
||||
cvta.headerGradientColor = colorFromJson(o, "headerGradientColor", cvta.headerGradientColor);
|
||||
cvta.itemBorderBottomColor = colorFromJson(o, "itemBorderBottomColor", cvta.itemBorderBottomColor);
|
||||
cvta.itemBorderTopColor = colorFromJson(o, "itemBorderTopColor", cvta.itemBorderTopColor);
|
||||
cvta.itemBorderBottomWidth = o["itemBorderBottomWidth"].toInt(cvta.itemBorderBottomWidth);
|
||||
cvta.itemBorderTopWidth = o["itemBorderTopWidth"].toInt(cvta.itemBorderTopWidth);
|
||||
cvta.itemTextColor = colorFromJson(o, "itemTextColor", cvta.itemTextColor);
|
||||
cvta.selectedColor = colorFromJson(o, "selectedColor", cvta.selectedColor);
|
||||
cvta.selectedTextColor = colorFromJson(o, "selectedTextColor", cvta.selectedTextColor);
|
||||
cvta.headerTextColor = colorFromJson(o, "headerTextColor", cvta.headerTextColor);
|
||||
cvta.starRatingColor = colorFromJson(o, "starRatingColor", cvta.starRatingColor);
|
||||
cvta.starRatingSelectedColor = colorFromJson(o, "starRatingSelectedColor", cvta.starRatingSelectedColor);
|
||||
}
|
||||
|
||||
if (json.contains("qmlView")) {
|
||||
const auto o = json["qmlView"].toObject();
|
||||
auto &qv = p.qmlViewParams;
|
||||
qv.backgroundColor = colorFromJson(o, "backgroundColor", qv.backgroundColor);
|
||||
qv.cellColor = colorFromJson(o, "cellColor", qv.cellColor);
|
||||
qv.cellColorWithBackground = colorFromJson(o, "cellColorWithBackground", qv.cellColorWithBackground);
|
||||
qv.selectedColor = colorFromJson(o, "selectedColor", qv.selectedColor);
|
||||
qv.selectedBorderColor = colorFromJson(o, "selectedBorderColor", qv.selectedBorderColor);
|
||||
qv.borderColor = colorFromJson(o, "borderColor", qv.borderColor);
|
||||
qv.titleColor = colorFromJson(o, "titleColor", qv.titleColor);
|
||||
qv.textColor = colorFromJson(o, "textColor", qv.textColor);
|
||||
if (json.contains("gridAndInfoView")) {
|
||||
const auto o = json["gridAndInfoView"].toObject();
|
||||
auto &giv = p.gridAndInfoViewParams;
|
||||
giv.backgroundColor = colorFromJson(o, "backgroundColor", giv.backgroundColor);
|
||||
giv.cellColor = colorFromJson(o, "cellColor", giv.cellColor);
|
||||
giv.cellColorWithBackground = colorFromJson(o, "cellColorWithBackground", giv.cellColorWithBackground);
|
||||
giv.selectedColor = colorFromJson(o, "selectedColor", giv.selectedColor);
|
||||
giv.selectedBorderColor = colorFromJson(o, "selectedBorderColor", giv.selectedBorderColor);
|
||||
giv.borderColor = colorFromJson(o, "borderColor", giv.borderColor);
|
||||
giv.titleColor = colorFromJson(o, "titleColor", giv.titleColor);
|
||||
giv.textColor = colorFromJson(o, "textColor", giv.textColor);
|
||||
if (o.contains("showDropShadow"))
|
||||
qv.showDropShadow = o["showDropShadow"].toBool(qv.showDropShadow);
|
||||
qv.infoBackgroundColor = colorFromJson(o, "infoBackgroundColor", qv.infoBackgroundColor);
|
||||
qv.infoBorderColor = colorFromJson(o, "infoBorderColor", qv.infoBorderColor);
|
||||
qv.infoShadowColor = colorFromJson(o, "infoShadowColor", qv.infoShadowColor);
|
||||
qv.infoTextColor = colorFromJson(o, "infoTextColor", qv.infoTextColor);
|
||||
qv.infoTitleColor = colorFromJson(o, "infoTitleColor", qv.infoTitleColor);
|
||||
qv.ratingUnselectedColor = colorFromJson(o, "ratingUnselectedColor", qv.ratingUnselectedColor);
|
||||
qv.ratingSelectedColor = colorFromJson(o, "ratingSelectedColor", qv.ratingSelectedColor);
|
||||
qv.favUncheckedColor = colorFromJson(o, "favUncheckedColor", qv.favUncheckedColor);
|
||||
qv.favCheckedColor = colorFromJson(o, "favCheckedColor", qv.favCheckedColor);
|
||||
qv.readTickUncheckedColor = colorFromJson(o, "readTickUncheckedColor", qv.readTickUncheckedColor);
|
||||
qv.readTickCheckedColor = colorFromJson(o, "readTickCheckedColor", qv.readTickCheckedColor);
|
||||
qv.currentComicBackgroundColor = colorFromJson(o, "currentComicBackgroundColor", qv.currentComicBackgroundColor);
|
||||
qv.continueReadingBackgroundColor = colorFromJson(o, "continueReadingBackgroundColor", qv.continueReadingBackgroundColor);
|
||||
qv.continueReadingColor = colorFromJson(o, "continueReadingColor", qv.continueReadingColor);
|
||||
qv.backgroundBlurOverlayColor = colorFromJson(o, "backgroundBlurOverlayColor", qv.backgroundBlurOverlayColor);
|
||||
giv.showDropShadow = o["showDropShadow"].toBool(giv.showDropShadow);
|
||||
giv.infoBackgroundColor = colorFromJson(o, "infoBackgroundColor", giv.infoBackgroundColor);
|
||||
giv.infoBorderColor = colorFromJson(o, "infoBorderColor", giv.infoBorderColor);
|
||||
giv.infoShadowColor = colorFromJson(o, "infoShadowColor", giv.infoShadowColor);
|
||||
giv.infoTextColor = colorFromJson(o, "infoTextColor", giv.infoTextColor);
|
||||
giv.infoTitleColor = colorFromJson(o, "infoTitleColor", giv.infoTitleColor);
|
||||
giv.ratingUnselectedColor = colorFromJson(o, "ratingUnselectedColor", giv.ratingUnselectedColor);
|
||||
giv.ratingSelectedColor = colorFromJson(o, "ratingSelectedColor", giv.ratingSelectedColor);
|
||||
giv.favUncheckedColor = colorFromJson(o, "favUncheckedColor", giv.favUncheckedColor);
|
||||
giv.favCheckedColor = colorFromJson(o, "favCheckedColor", giv.favCheckedColor);
|
||||
giv.readTickUncheckedColor = colorFromJson(o, "readTickUncheckedColor", giv.readTickUncheckedColor);
|
||||
giv.readTickCheckedColor = colorFromJson(o, "readTickCheckedColor", giv.readTickCheckedColor);
|
||||
giv.currentComicBackgroundColor = colorFromJson(o, "currentComicBackgroundColor", giv.currentComicBackgroundColor);
|
||||
giv.continueReadingBackgroundColor = colorFromJson(o, "continueReadingBackgroundColor", giv.continueReadingBackgroundColor);
|
||||
giv.continueReadingColor = colorFromJson(o, "continueReadingColor", giv.continueReadingColor);
|
||||
giv.backgroundBlurOverlayColor = colorFromJson(o, "backgroundBlurOverlayColor", giv.backgroundBlurOverlayColor);
|
||||
}
|
||||
|
||||
if (json.contains("comicsViewToolbar")) {
|
||||
|
||||
@ -56,7 +56,7 @@ YACReaderTableView::YACReaderTableView(QWidget *parent)
|
||||
|
||||
void YACReaderTableView::applyTheme(const Theme &theme)
|
||||
{
|
||||
setStyleSheet(theme.tableView.tableViewQSS);
|
||||
setStyleSheet(theme.comicsViewTable.tableViewQSS);
|
||||
}
|
||||
|
||||
void YACReaderTableView::mouseMoveEvent(QMouseEvent *event)
|
||||
|
||||
@ -13,8 +13,8 @@ class YACReaderTableView : public QTableView, protected Themable
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit YACReaderTableView(QWidget *parent = 0);
|
||||
QColor starRatingColor() const { return theme.tableView.starRatingColor; }
|
||||
QColor starRatingSelectedColor() const { return theme.tableView.starRatingSelectedColor; }
|
||||
QColor starRatingColor() const { return theme.comicsViewTable.starRatingColor; }
|
||||
QColor starRatingSelectedColor() const { return theme.comicsViewTable.starRatingSelectedColor; }
|
||||
|
||||
protected:
|
||||
void applyTheme(const Theme &theme) override;
|
||||
|
||||
@ -21,7 +21,7 @@ YACReaderTreeView::YACReaderTreeView(QWidget *parent)
|
||||
|
||||
void YACReaderTreeView::applyTheme(const Theme &theme)
|
||||
{
|
||||
setStyleSheet(theme.treeView.treeViewQSS);
|
||||
setStyleSheet(theme.navigationTree.navigationTreeQSS);
|
||||
}
|
||||
|
||||
void YACReaderTreeView::mousePressEvent(QMouseEvent *event)
|
||||
|
||||
@ -10,7 +10,7 @@ class YACReaderTreeView : public QTreeView, protected Themable
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit YACReaderTreeView(QWidget *parent = 0);
|
||||
QColor folderIndicatorColor() const { return theme.treeView.folderIndicatorColor; }
|
||||
QColor folderIndicatorColor() const { return theme.navigationTree.folderIndicatorColor; }
|
||||
|
||||
private:
|
||||
void mousePressEvent(QMouseEvent *event) override;
|
||||
|
||||
Reference in New Issue
Block a user