From 68baa0452213f82864f3a0aac19584267735c442 Mon Sep 17 00:00:00 2001 From: Bart De Vries Date: Thu, 25 May 2023 15:13:04 +0200 Subject: [PATCH] Also update fullscreen image if chapter image in HeaderBar changes BUG: 470194 --- src/qml/Desktop/HeaderBar.qml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/qml/Desktop/HeaderBar.qml b/src/qml/Desktop/HeaderBar.qml index e32dae00..5c3ce9e1 100644 --- a/src/qml/Desktop/HeaderBar.qml +++ b/src/qml/Desktop/HeaderBar.qml @@ -52,11 +52,12 @@ FocusScope { } function openFullScreenImage() { - fullScreenImageLoader.setSource("qrc:/FullScreenImage.qml", { - "image": headerMetaData.image, - "description": headerMetaData.title, - "loader": fullScreenImageLoader - }); + var options = { + "image": Qt.binding(function() { return headerMetaData.image }), + "description": Qt.binding(function() { return headerMetaData.title }), + "loader": Qt.binding(function() { return fullScreenImageLoader}) + }; + fullScreenImageLoader.setSource("qrc:/FullScreenImage.qml", options); fullScreenImageLoader.active = true; fullScreenImageLoader.item.open(); }