Fix first binding pass in grid comics view
Some checks are pending
Build / Initialization (push) Waiting to run
Build / Code Format Validation (push) Blocked by required conditions
Build / Linux (Qt6) (push) Blocked by required conditions
Build / Linux (Qt6 + 7zip) (push) Blocked by required conditions
Build / macOS (Qt6 Universal) (push) Blocked by required conditions
Build / Windows x64 (Qt6) (push) Blocked by required conditions
Build / Windows ARM64 (Qt6) (push) Blocked by required conditions
Build / Docker amd64 Image (push) Blocked by required conditions
Build / Docker arm64 Image (push) Blocked by required conditions
Build / Publish Dev Builds (push) Blocked by required conditions
Build / Publish Release (push) Blocked by required conditions
Build / Publish YACReader10 Pre-release Builds (push) Blocked by required conditions

This commit is contained in:
luisangelsm
2026-04-12 13:16:53 +02:00
parent 4f61d64e27
commit 9ffe114c15

View File

@ -69,8 +69,17 @@ GridComicsView::GridComicsView(QWidget *parent)
ctxt->setContextProperty("currentComicInfo", comicInfo); ctxt->setContextProperty("currentComicInfo", comicInfo);
ctxt->setContextProperty("showCurrentComic", QVariant(false)); ctxt->setContextProperty("showCurrentComic", QVariant(false));
showInfoAction = new QAction(tr("Show info"), this);
showInfoAction->setCheckable(true);
showInfoAction->setChecked(showInfo);
connect(showInfoAction, &QAction::toggled, this, &GridComicsView::showInfo);
updateCoversSizeInContext(YACREADER_MIN_COVER_WIDTH, ctxt); updateCoversSizeInContext(YACREADER_MIN_COVER_WIDTH, ctxt);
// Seed theme globals before loading QML so the first binding pass does not
// resolve them as undefined and spam startup warnings.
initTheme(this);
view->setSource(QUrl("qrc:/qml/GridComicsView.qml")); view->setSource(QUrl("qrc:/qml/GridComicsView.qml"));
auto rootObject = dynamic_cast<QObject *>(view->rootObject()); auto rootObject = dynamic_cast<QObject *>(view->rootObject());
@ -78,14 +87,6 @@ GridComicsView::GridComicsView(QWidget *parent)
QQmlProperty(infoContainer, "width").write(settings->value(COMICS_GRID_INFO_WIDTH, 350)); QQmlProperty(infoContainer, "width").write(settings->value(COMICS_GRID_INFO_WIDTH, 350));
showInfoAction = new QAction(tr("Show info"), this);
showInfoAction->setCheckable(true);
showInfoAction->setChecked(showInfo);
connect(showInfoAction, &QAction::toggled, this, &GridComicsView::showInfo);
// Apply theme colors (must be after showInfoAction is created)
initTheme(this);
setShowMarks(true); // TODO save this in settings setShowMarks(true); // TODO save this in settings
auto l = new QVBoxLayout; auto l = new QVBoxLayout;