From 1d3b58ac469af2181fd6d457d4412fe602cdc140 Mon Sep 17 00:00:00 2001 From: Agel Date: Mon, 23 Mar 2026 22:57:57 +0100 Subject: [PATCH] scroll fixes --- src/qml/components/PageView.qml | 5 +++-- tests/BookControllerTest.cpp | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/qml/components/PageView.qml b/src/qml/components/PageView.qml index c79de39..0dfc6b2 100644 --- a/src/qml/components/PageView.qml +++ b/src/qml/components/PageView.qml @@ -16,9 +16,9 @@ Rectangle { ListView { id: chunkListView anchors.fill: parent - anchors.topMargin: appState.verticalMargin - anchors.bottomMargin: appState.verticalMargin model: bookController.hasBook ? readingModel : null + header: Item { height: appState.verticalMargin } + footer: Item { height: appState.verticalMargin } cacheBuffer: 2000 clip: true @@ -65,6 +65,7 @@ Rectangle { MouseArea { anchors.fill: parent + anchors.rightMargin: 18 z: 1 onClicked: clickDebounce.restart() onDoubleClicked: { diff --git a/tests/BookControllerTest.cpp b/tests/BookControllerTest.cpp index eee8311..0feed3c 100644 --- a/tests/BookControllerTest.cpp +++ b/tests/BookControllerTest.cpp @@ -172,7 +172,7 @@ private slots: // IFileDialogService tests - void browseAndOpenCallsServiceOpen() + void browseAndOpenCallsServiceOpen() const { BookController ctrl; FakeFileDialogService svc; @@ -183,7 +183,7 @@ private slots: QVERIFY(svc.openCalled); } - void browseAndOpenUsesService() + void browseAndOpenUsesService() const { BookController ctrl; FakeFileDialogService svc; @@ -196,7 +196,7 @@ private slots: QVERIFY(ctrl.hasBook()); } - void browseAndOpenNoopWhenNoService() + void browseAndOpenNoopWhenNoService() const { BookController ctrl; // No service set — must not crash