mirror of
https://github.com/YACReader/yacreader
synced 2025-07-18 21:14:33 -04:00
Enabled light theme for info views in osx.
This commit is contained in:
@ -23,8 +23,55 @@ InfoComicsView::InfoComicsView(QWidget *parent)
|
||||
|
||||
container->setFocusPolicy(Qt::StrongFocus);
|
||||
|
||||
view->setSource(QUrl("qrc:/qml/InfoComicsView.qml"));
|
||||
QQmlContext *ctxt = view->rootContext();
|
||||
|
||||
LibraryUITheme theme;
|
||||
#ifdef Q_OS_MAC
|
||||
theme = Light
|
||||
#else
|
||||
theme = Dark;
|
||||
#endif
|
||||
|
||||
if(theme == Light)
|
||||
{
|
||||
ctxt->setContextProperty("infoBackgroundColor", "#FFFFFF");
|
||||
ctxt->setContextProperty("topShadow", QUrl());
|
||||
ctxt->setContextProperty("infoShadow", "info-shadow-light.png");
|
||||
ctxt->setContextProperty("infoIndicator", "info-indicator-light.png");
|
||||
|
||||
ctxt->setContextProperty("infoTextColor", "#404040");
|
||||
ctxt->setContextProperty("infoTitleColor", "#2E2E2E");
|
||||
|
||||
ctxt->setContextProperty("ratingUnselectedColor", "#DEDEDE");
|
||||
ctxt->setContextProperty("ratingSelectedColor", "#2B2B2B");
|
||||
|
||||
ctxt->setContextProperty("favUncheckedColor", "#DEDEDE");
|
||||
ctxt->setContextProperty("favCheckedColor", "#E84852");
|
||||
|
||||
ctxt->setContextProperty("readTickUncheckedColor", "#DEDEDE");
|
||||
ctxt->setContextProperty("readTickCheckedColor", "#E84852");
|
||||
}
|
||||
else
|
||||
{
|
||||
ctxt->setContextProperty("infoBackgroundColor", "#2E2E2E");
|
||||
ctxt->setContextProperty("topShadow", "info-top-shadow.png");
|
||||
ctxt->setContextProperty("infoShadow", "info-shadow.png");
|
||||
ctxt->setContextProperty("infoIndicator", "info-indicator.png");
|
||||
|
||||
ctxt->setContextProperty("infoTextColor", "#B0B0B0");
|
||||
ctxt->setContextProperty("infoTitleColor", "#FFFFFF");
|
||||
|
||||
ctxt->setContextProperty("ratingUnselectedColor", "#1C1C1C");
|
||||
ctxt->setContextProperty("ratingSelectedColor", "#FFFFFF");
|
||||
|
||||
ctxt->setContextProperty("favUncheckedColor", "#1C1C1C");
|
||||
ctxt->setContextProperty("favCheckedColor", "#E84852");
|
||||
|
||||
ctxt->setContextProperty("readTickUncheckedColor", "#1C1C1C");
|
||||
ctxt->setContextProperty("readTickCheckedColor", "#E84852");
|
||||
}
|
||||
|
||||
view->setSource(QUrl("qrc:/qml/InfoComicsView.qml"));
|
||||
|
||||
QObject *rootObject = dynamic_cast<QObject*>(view->rootObject());
|
||||
flow = rootObject->findChild<QObject*>("flow");
|
||||
|
Reference in New Issue
Block a user