Make the blur backgroud color overlay themable

This also fixes the hardcoded color in FlowView.qml
This commit is contained in:
luisangelsm
2026-03-01 15:22:54 +01:00
parent 52e43192c4
commit 87fada611d
5 changed files with 14 additions and 1 deletions

View File

@ -220,6 +220,7 @@ 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);
}
@ -491,6 +492,7 @@ void GridComicsView::applyTheme(const Theme &theme)
// 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);

View File

@ -243,4 +243,5 @@ void InfoComicsView::applyTheme(const Theme &theme)
ctxt->setContextProperty("readTickCheckedColor", qv.readTickCheckedColor);
ctxt->setContextProperty("showDropShadow", QVariant(qv.showDropShadow));
ctxt->setContextProperty("backgroundBlurOverlayColor", qv.backgroundBlurOverlayColor);
}

View File

@ -25,7 +25,7 @@ Rectangle {
Rectangle {
id: background
color: "#2A2A2A"
color: backgroundBlurOverlayColor
anchors.fill: backgroundImg
}

View File

@ -241,6 +241,9 @@ struct QmlViewTheme {
// Continue reading section (FolderContentView)
QColor continueReadingBackgroundColor;
QColor continueReadingColor;
// Blur overlay background (FlowView always, GridView when background image enabled)
QColor backgroundBlurOverlayColor;
};
struct MainToolbarThemeTemplates {

View File

@ -170,6 +170,9 @@ struct QmlViewParams {
// Continue reading section (FolderContentView)
QColor continueReadingBackgroundColor;
QColor continueReadingColor;
// Blur overlay background (FlowView always, GridView when background image enabled)
QColor backgroundBlurOverlayColor;
};
struct MainToolbarParams {
@ -514,6 +517,7 @@ Theme makeTheme(const ThemeParams &params)
theme.qmlView.currentComicBackgroundColor = qv.currentComicBackgroundColor;
theme.qmlView.continueReadingBackgroundColor = qv.continueReadingBackgroundColor;
theme.qmlView.continueReadingColor = qv.continueReadingColor;
theme.qmlView.backgroundBlurOverlayColor = qv.backgroundBlurOverlayColor;
// end QmlView
// MainToolbar
@ -1036,6 +1040,7 @@ ThemeParams classicThemeParams()
qv.currentComicBackgroundColor = QColor(0x00, 0x00, 0x00, 0x88);
qv.continueReadingBackgroundColor = QColor(0x00, 0x00, 0x00, 0x88);
qv.continueReadingColor = QColor(0xFFFFFF);
qv.backgroundBlurOverlayColor = QColor(0x2A2A2A);
params.qmlViewParams = qv;
MainToolbarParams mt;
@ -1307,6 +1312,7 @@ ThemeParams lightThemeParams()
qv.currentComicBackgroundColor = QColor(0xFF, 0xFF, 0xFF, 0x88);
qv.continueReadingBackgroundColor = QColor(0xE8E8E8);
qv.continueReadingColor = QColor::fromRgb(0x000000);
qv.backgroundBlurOverlayColor = QColor(0x9E9E9E);
params.qmlViewParams = qv;
MainToolbarParams mt;
@ -1578,6 +1584,7 @@ ThemeParams darkThemeParams()
qv.currentComicBackgroundColor = QColor(0x00, 0x00, 0x00, 0x88);
qv.continueReadingBackgroundColor = QColor(0x00, 0x00, 0x00, 0x88);
qv.continueReadingColor = QColor(0xFFFFFF);
qv.backgroundBlurOverlayColor = QColor(0x2A2A2A);
params.qmlViewParams = qv;
MainToolbarParams mt;