From e8fab784c7a7ff7591f4d59cdf5ebf73aa0e1a05 Mon Sep 17 00:00:00 2001 From: GM Date: Thu, 12 Nov 2026 04:50:16 -0400 Subject: [PATCH 1/3] Make the rows past a view's edges with the ones shown Qt's cache buffer makes them later, from a 16 ms timer of its own, and a race in Qt can leave that timer running: an idle window then draws a frame every refresh. The list and the columns make the same rows at once with display margins; the grid keeps its own row past each edge. --- src/FolderColumns.qml | 14 ++++++ src/FolderGrid.qml | 2 + src/FolderList.qml | 6 +++ tests/folio_tests.cpp | 106 ++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 128 insertions(+) diff --git a/src/FolderColumns.qml b/src/FolderColumns.qml index 7e802fff..d8402c4a 100644 --- a/src/FolderColumns.qml +++ b/src/FolderColumns.qml @@ -11,6 +11,8 @@ Item { property alias currentIndex: here.currentIndex readonly property int columnWidth: 260 + // How far past its edges a column makes rows: as far as Qt's default cache buffer reached. + readonly property int rowsPastEdges: 320 function select(row, keep) { selecting.select(row, keep) } signal cursorLetGo() @@ -100,6 +102,10 @@ Item { clip: true acceptedButtons: Qt.NoButton boundsBehavior: Flickable.StopAtBounds + // Rows just past the edges are made with the ones shown, not later by Qt's cache buffer: its 16 ms timer can leave an idle window drawing every refresh. + cacheBuffer: 0 + displayMarginBeginning: view.rowsPastEdges + displayMarginEnd: view.rowsPastEdges ScrollBar.vertical: FolioScrollBar { } model: FolderModel { id: folder @@ -152,6 +158,10 @@ Item { currentIndex: -1 acceptedButtons: Qt.NoButton boundsBehavior: Flickable.StopAtBounds + // Rows just past the edges are made with the ones shown, not later by Qt's cache buffer: its 16 ms timer can leave an idle window drawing every refresh. + cacheBuffer: 0 + displayMarginBeginning: view.rowsPastEdges + displayMarginEnd: view.rowsPastEdges highlightFollowsCurrentItem: false model: backend.folder ScrollBar.vertical: FolioScrollBar { } @@ -197,6 +207,10 @@ Item { clip: true acceptedButtons: Qt.NoButton boundsBehavior: Flickable.StopAtBounds + // Rows just past the edges are made with the ones shown, not later by Qt's cache buffer: its 16 ms timer can leave an idle window drawing every refresh. + cacheBuffer: 0 + displayMarginBeginning: view.rowsPastEdges + displayMarginEnd: view.rowsPastEdges ScrollBar.vertical: FolioScrollBar { } TapHandler { acceptedButtons: Qt.RightButton diff --git a/src/FolderGrid.qml b/src/FolderGrid.qml index 37385b8a..b23c11b8 100644 --- a/src/FolderGrid.qml +++ b/src/FolderGrid.qml @@ -60,6 +60,8 @@ GridView { // still scroll, which turning the view's interactive off would stop too. acceptedButtons: Qt.NoButton boundsBehavior: Flickable.StopAtBounds + // No cache buffer: its 16 ms timer can leave an idle window drawing every refresh. The grid still makes a row past each edge; display margins would draw those tiles' layers. + cacheBuffer: 0 model: backend.folder // Tiles grow with the zoom; the name and details under them don't. A // narrow pane (one side of a split) caps it at a tile its width holds. diff --git a/src/FolderList.qml b/src/FolderList.qml index 8e93a633..bc764134 100644 --- a/src/FolderList.qml +++ b/src/FolderList.qml @@ -49,6 +49,12 @@ ListView { currentIndex: -1 acceptedButtons: Qt.NoButton boundsBehavior: Flickable.StopAtBounds + // Rows just past the edges are made with the ones shown, not later by Qt's cache buffer: its 16 ms timer can leave an idle window drawing every refresh. + cacheBuffer: 0 + // As far as Qt's default cache buffer reached. + readonly property int rowsPastEdges: 320 + displayMarginBeginning: rowsPastEdges + displayMarginEnd: rowsPastEdges highlightFollowsCurrentItem: false model: backend.folder ScrollBar.vertical: FolioScrollBar { } diff --git a/tests/folio_tests.cpp b/tests/folio_tests.cpp index e5278791..14d3f1d6 100644 --- a/tests/folio_tests.cpp +++ b/tests/folio_tests.cpp @@ -5731,6 +5731,112 @@ private slots: } } + void viewsMakeTheRowsPastTheirEdgesWithTheOnesShown_data() + { + QTest::addColumn("pane"); + QTest::addColumn("views"); + QTest::addColumn("margins"); + // A grid makes a row past each edge by itself, and its tiles are too dear to draw unseen. + QTest::newRow("grid") << "FolderGrid" << 1 << false; + QTest::newRow("list") << "FolderList" << 1 << true; + // The folder before this one, this one, and the folder selected in it. + QTest::newRow("columns") << "FolderColumns" << 3 << true; + } + + void viewsMakeTheRowsPastTheirEdgesWithTheOnesShown() + { + // Qt's cache buffer makes those rows later, from a 16 ms timer of its own that can leave an idle window drawing every refresh. + QFETCH(QString, pane); + QFETCH(int, views); + QFETCH(bool, margins); + // How far Qt's default cache buffer reached, in pixels, and longer than its timer takes to add its rows, in milliseconds. + const int reach = 320; + const int settle = 300; + QTemporaryDir home; + QVERIFY(QDir(home.path()).mkpath("top/a/a")); + for (int i = 10; i < 70; ++i) { + QVERIFY(QDir(home.path()).mkpath(QString("top/b%1").arg(i))); + write(home.filePath(QString("top/a/f%1").arg(i)), "x"); + write(home.filePath(QString("top/a/a/g%1").arg(i)), "x"); + } + Backend backend(home.path()); + backend.navigate(home.filePath("top/a")); + QTRY_COMPARE(backend.folder()->rowCount(), 61); + Theme theme(home.filePath("theme")); + FileOps fileOps; + Translator translator(home.filePath("language"), home.path()); + qmlRegisterType("Folio", 1, 0, "FolderModel"); + QQmlEngine engine; + engine.rootContext()->setContextProperty("backend", &backend); + engine.rootContext()->setContextProperty("theme", &theme); + engine.rootContext()->setContextProperty("fileOps", &fileOps); + engine.rootContext()->setContextProperty("translator", &translator); + Thumbnails thumbnails(home.filePath("cache"), {home.filePath("none")}); + engine.addImageProvider("thumb", new ThumbnailProvider(&thumbnails)); + QQmlComponent component(&engine); + component.setData(QByteArray("import QtQuick\n" + "Window {\n" + " width: 1003; height: 300; visible: true\n" + " PANE { id: pane; anchors.fill: parent }\n" + " // The views of many rows, wherever the pane keeps them: a view's content is among its children.\n" + " function views(item = pane, found = []) {\n" + " if ((item instanceof ListView || item instanceof GridView) && item.count > 40)\n" + " found.push(item)\n" + " for (const child of item.children)\n" + " views(child, found)\n" + " return found\n" + " }\n" + " function rows(view) {\n" + " view.forceLayout()\n" + " const made = []\n" + " for (let row = 0; row < view.count; ++row)\n" + " if (view.itemAtIndex(row))\n" + " made.push(view.itemAtIndex(row))\n" + " return made\n" + " }\n" + " // The columns show a folder's contents once it is selected.\n" + " function selectFirst() {\n" + " if (!(pane instanceof ListView) && !(pane instanceof GridView))\n" + " pane.currentIndex = 0\n" + " }\n" + " // Moved to its end and back, in one go: whether rows reached REACH pixels behind the top edge, then as far past the bottom one, and the rows made.\n" + " property var judged: []\n" + " function moved() {\n" + " judged = views()\n" + " return judged.map(view => {\n" + " view.positionViewAtEnd()\n" + " const behind = rows(view).some(item => item.y <= view.contentY - REACH)\n" + " view.positionViewAtBeginning()\n" + " const made = rows(view)\n" + " return behind + '/' + made.some(item => item.y + item.height >= view.contentY + view.height + REACH) + '/' + made.length\n" + " }).join(' ')\n" + " }\n" + " function made() { return (judged.length ? judged : views()).map(view => rows(view).length).join(' ') }\n" + "}\n").replace("PANE", pane.toUtf8()).replace("REACH", QByteArray::number(reach)), + QUrl::fromLocalFile(sourceFolder() + "/ViewRowsTest.qml")); + std::unique_ptr window(component.create()); + QVERIFY2(window, qPrintable(component.errorString())); + const auto said = [&](const char *function) { + QVariant result; + QMetaObject::invokeMethod(window.get(), function, Q_RETURN_ARG(QVariant, result)); + return result; + }; + QMetaObject::invokeMethod(window.get(), "selectFirst"); + const auto made = [&] { return said("made").toString().split(' ', Qt::SkipEmptyParts); }; + // A window just made has its views without rows yet. + QTRY_VERIFY(made().size() == views && !made().contains("0")); + const QStringList moved = said("moved").toString().split(' ', Qt::SkipEmptyParts); + QCOMPARE(moved.size(), views); + QStringList atOnce; + for (const QString &view : moved) { + const QStringList parts = view.split('/'); + QVERIFY2(!margins || (parts.at(0) == "true" && parts.at(1) == "true"), qPrintable("behind the top / past the bottom / rows: " + moved.join(' '))); + atOnce << parts.at(2); + } + QTest::qWait(settle); + QCOMPARE(made(), atOnce); + } + void themeFallsBack() { QTemporaryDir dir; From 6d07db6b6a27c1cd2fa91cbc182d1709e506e048 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Mon, 16 Nov 2026 10:17:44 +0100 Subject: [PATCH 2/3] Keep only the missing cache buffer, and test it directly The cache buffer was the cause. The display margins kept making rows, and starting their thumbnails, ahead of a scroll the way the cache used to, at the cost of drawing those rows. The maintainer asked for the fix as small as it can be, so the views keep just cacheBuffer: 0, with the reason stated once. Without the margins a wheel or fast scroll can show a row's glyph for a frame or two before its thumbnail arrives; the rows themselves are always there. The test checks every folder view's cache buffer. An idle window draws no frames offscreen, so the redraw itself cannot be seen in the suite; on a compositor, Folio's panes forced through Qt's race drew a frame every refresh on main and none with this. Co-Authored-By: Claude Opus 5.5 Co-Authored-By: Codex Medium --- src/FolderColumns.qml | 11 ---- src/FolderGrid.qml | 1 - src/FolderList.qml | 7 +-- tests/folio_tests.cpp | 116 ++++++++++++------------------------------ 4 files changed, 34 insertions(+), 101 deletions(-) diff --git a/src/FolderColumns.qml b/src/FolderColumns.qml index d8402c4a..6107dbae 100644 --- a/src/FolderColumns.qml +++ b/src/FolderColumns.qml @@ -11,8 +11,6 @@ Item { property alias currentIndex: here.currentIndex readonly property int columnWidth: 260 - // How far past its edges a column makes rows: as far as Qt's default cache buffer reached. - readonly property int rowsPastEdges: 320 function select(row, keep) { selecting.select(row, keep) } signal cursorLetGo() @@ -102,10 +100,7 @@ Item { clip: true acceptedButtons: Qt.NoButton boundsBehavior: Flickable.StopAtBounds - // Rows just past the edges are made with the ones shown, not later by Qt's cache buffer: its 16 ms timer can leave an idle window drawing every refresh. cacheBuffer: 0 - displayMarginBeginning: view.rowsPastEdges - displayMarginEnd: view.rowsPastEdges ScrollBar.vertical: FolioScrollBar { } model: FolderModel { id: folder @@ -158,10 +153,7 @@ Item { currentIndex: -1 acceptedButtons: Qt.NoButton boundsBehavior: Flickable.StopAtBounds - // Rows just past the edges are made with the ones shown, not later by Qt's cache buffer: its 16 ms timer can leave an idle window drawing every refresh. cacheBuffer: 0 - displayMarginBeginning: view.rowsPastEdges - displayMarginEnd: view.rowsPastEdges highlightFollowsCurrentItem: false model: backend.folder ScrollBar.vertical: FolioScrollBar { } @@ -207,10 +199,7 @@ Item { clip: true acceptedButtons: Qt.NoButton boundsBehavior: Flickable.StopAtBounds - // Rows just past the edges are made with the ones shown, not later by Qt's cache buffer: its 16 ms timer can leave an idle window drawing every refresh. cacheBuffer: 0 - displayMarginBeginning: view.rowsPastEdges - displayMarginEnd: view.rowsPastEdges ScrollBar.vertical: FolioScrollBar { } TapHandler { acceptedButtons: Qt.RightButton diff --git a/src/FolderGrid.qml b/src/FolderGrid.qml index b23c11b8..e72896b3 100644 --- a/src/FolderGrid.qml +++ b/src/FolderGrid.qml @@ -60,7 +60,6 @@ GridView { // still scroll, which turning the view's interactive off would stop too. acceptedButtons: Qt.NoButton boundsBehavior: Flickable.StopAtBounds - // No cache buffer: its 16 ms timer can leave an idle window drawing every refresh. The grid still makes a row past each edge; display margins would draw those tiles' layers. cacheBuffer: 0 model: backend.folder // Tiles grow with the zoom; the name and details under them don't. A diff --git a/src/FolderList.qml b/src/FolderList.qml index bc764134..c5a815f5 100644 --- a/src/FolderList.qml +++ b/src/FolderList.qml @@ -49,12 +49,9 @@ ListView { currentIndex: -1 acceptedButtons: Qt.NoButton boundsBehavior: Flickable.StopAtBounds - // Rows just past the edges are made with the ones shown, not later by Qt's cache buffer: its 16 ms timer can leave an idle window drawing every refresh. + // No cache buffer, here or in the grid and columns: Qt's 16 ms pause before + // filling one can leave an idle window drawing every refresh. cacheBuffer: 0 - // As far as Qt's default cache buffer reached. - readonly property int rowsPastEdges: 320 - displayMarginBeginning: rowsPastEdges - displayMarginEnd: rowsPastEdges highlightFollowsCurrentItem: false model: backend.folder ScrollBar.vertical: FolioScrollBar { } diff --git a/tests/folio_tests.cpp b/tests/folio_tests.cpp index 14d3f1d6..f5232193 100644 --- a/tests/folio_tests.cpp +++ b/tests/folio_tests.cpp @@ -5731,110 +5731,58 @@ private slots: } } - void viewsMakeTheRowsPastTheirEdgesWithTheOnesShown_data() + void folderViewsKeepNoCacheBuffer_data() { QTest::addColumn("pane"); - QTest::addColumn("views"); - QTest::addColumn("margins"); - // A grid makes a row past each edge by itself, and its tiles are too dear to draw unseen. - QTest::newRow("grid") << "FolderGrid" << 1 << false; - QTest::newRow("list") << "FolderList" << 1 << true; - // The folder before this one, this one, and the folder selected in it. - QTest::newRow("columns") << "FolderColumns" << 3 << true; + QTest::newRow("grid") << QString("FolderGrid"); + QTest::newRow("list") << QString("FolderList"); + QTest::newRow("columns") << QString("FolderColumns"); } - void viewsMakeTheRowsPastTheirEdgesWithTheOnesShown() + void folderViewsKeepNoCacheBuffer() { - // Qt's cache buffer makes those rows later, from a 16 ms timer of its own that can leave an idle window drawing every refresh. + // An idle window draws no frames offscreen, so this checks the cause + // instead: Qt's pause before filling a cache buffer can leave it drawing. QFETCH(QString, pane); - QFETCH(int, views); - QFETCH(bool, margins); - // How far Qt's default cache buffer reached, in pixels, and longer than its timer takes to add its rows, in milliseconds. - const int reach = 320; - const int settle = 300; QTemporaryDir home; - QVERIFY(QDir(home.path()).mkpath("top/a/a")); - for (int i = 10; i < 70; ++i) { - QVERIFY(QDir(home.path()).mkpath(QString("top/b%1").arg(i))); - write(home.filePath(QString("top/a/f%1").arg(i)), "x"); - write(home.filePath(QString("top/a/a/g%1").arg(i)), "x"); - } + QVERIFY(QDir(home.path()).mkpath("a/b")); Backend backend(home.path()); - backend.navigate(home.filePath("top/a")); - QTRY_COMPARE(backend.folder()->rowCount(), 61); + backend.navigate(home.filePath("a")); + QTRY_COMPARE(backend.folder()->rowCount(), 1); Theme theme(home.filePath("theme")); FileOps fileOps; Translator translator(home.filePath("language"), home.path()); + Thumbnails thumbnails(home.filePath("cache"), {home.filePath("none")}); qmlRegisterType("Folio", 1, 0, "FolderModel"); QQmlEngine engine; engine.rootContext()->setContextProperty("backend", &backend); engine.rootContext()->setContextProperty("theme", &theme); engine.rootContext()->setContextProperty("fileOps", &fileOps); engine.rootContext()->setContextProperty("translator", &translator); - Thumbnails thumbnails(home.filePath("cache"), {home.filePath("none")}); + engine.rootContext()->setContextProperty("plugins", QVariantMap{{"views", QVariantMap{}}}); engine.addImageProvider("thumb", new ThumbnailProvider(&thumbnails)); QQmlComponent component(&engine); - component.setData(QByteArray("import QtQuick\n" - "Window {\n" - " width: 1003; height: 300; visible: true\n" - " PANE { id: pane; anchors.fill: parent }\n" - " // The views of many rows, wherever the pane keeps them: a view's content is among its children.\n" - " function views(item = pane, found = []) {\n" - " if ((item instanceof ListView || item instanceof GridView) && item.count > 40)\n" - " found.push(item)\n" - " for (const child of item.children)\n" - " views(child, found)\n" - " return found\n" - " }\n" - " function rows(view) {\n" - " view.forceLayout()\n" - " const made = []\n" - " for (let row = 0; row < view.count; ++row)\n" - " if (view.itemAtIndex(row))\n" - " made.push(view.itemAtIndex(row))\n" - " return made\n" - " }\n" - " // The columns show a folder's contents once it is selected.\n" - " function selectFirst() {\n" - " if (!(pane instanceof ListView) && !(pane instanceof GridView))\n" - " pane.currentIndex = 0\n" - " }\n" - " // Moved to its end and back, in one go: whether rows reached REACH pixels behind the top edge, then as far past the bottom one, and the rows made.\n" - " property var judged: []\n" - " function moved() {\n" - " judged = views()\n" - " return judged.map(view => {\n" - " view.positionViewAtEnd()\n" - " const behind = rows(view).some(item => item.y <= view.contentY - REACH)\n" - " view.positionViewAtBeginning()\n" - " const made = rows(view)\n" - " return behind + '/' + made.some(item => item.y + item.height >= view.contentY + view.height + REACH) + '/' + made.length\n" - " }).join(' ')\n" - " }\n" - " function made() { return (judged.length ? judged : views()).map(view => rows(view).length).join(' ') }\n" - "}\n").replace("PANE", pane.toUtf8()).replace("REACH", QByteArray::number(reach)), - QUrl::fromLocalFile(sourceFolder() + "/ViewRowsTest.qml")); - std::unique_ptr window(component.create()); - QVERIFY2(window, qPrintable(component.errorString())); - const auto said = [&](const char *function) { - QVariant result; - QMetaObject::invokeMethod(window.get(), function, Q_RETURN_ARG(QVariant, result)); - return result; + component.setData(QString(R"( + import QtQuick + Window { + width: 800; height: 300; visible: true + %1 { id: pane; anchors.fill: parent } + function buffersIn(item) { + const own = item instanceof ListView || item instanceof GridView ? [item.cacheBuffer] : [] + return own.concat(...Array.from(item.children, child => buffersIn(child))) + } + function buffers() { return buffersIn(pane) } + } + )").arg(pane).toUtf8(), QUrl::fromLocalFile(sourceFolder() + "/CacheBufferTest.qml")); + std::unique_ptr root(component.create()); + QVERIFY2(root, qPrintable(component.errorString())); + const auto buffers = [&] { + QVariant found; + QMetaObject::invokeMethod(root.get(), "buffers", Q_RETURN_ARG(QVariant, found)); + return found.toList(); }; - QMetaObject::invokeMethod(window.get(), "selectFirst"); - const auto made = [&] { return said("made").toString().split(' ', Qt::SkipEmptyParts); }; - // A window just made has its views without rows yet. - QTRY_VERIFY(made().size() == views && !made().contains("0")); - const QStringList moved = said("moved").toString().split(' ', Qt::SkipEmptyParts); - QCOMPARE(moved.size(), views); - QStringList atOnce; - for (const QString &view : moved) { - const QStringList parts = view.split('/'); - QVERIFY2(!margins || (parts.at(0) == "true" && parts.at(1) == "true"), qPrintable("behind the top / past the bottom / rows: " + moved.join(' '))); - atOnce << parts.at(2); - } - QTest::qWait(settle); - QCOMPARE(made(), atOnce); + QTRY_COMPARE(buffers().size(), pane == "FolderColumns" ? 3 : 1); + QCOMPARE(buffers(), QVariantList(buffers().size(), 0)); } void themeFallsBack() From 9b4d0b14589207d215d336bce8d1906a663e16c4 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Mon, 16 Nov 2026 10:54:45 +0100 Subject: [PATCH 3/3] Keep the lists' settings in one view of their own The list and the three lists of the columns each repeated the same setup: clipping, no dragging, Folio's scroll bar, and now no cache buffer. FileListView holds it once, with the reason for the buffer, so the next setting every list needs goes in one place. Co-Authored-By: Claude Opus 5.5 --- src/FileListView.qml | 15 +++++++++++++++ src/FolderColumns.qml | 21 +++------------------ src/FolderGrid.qml | 1 + src/FolderList.qml | 9 +-------- src/resources.qrc | 1 + 5 files changed, 21 insertions(+), 26 deletions(-) create mode 100644 src/FileListView.qml diff --git a/src/FileListView.qml b/src/FileListView.qml new file mode 100644 index 00000000..3178b320 --- /dev/null +++ b/src/FileListView.qml @@ -0,0 +1,15 @@ +import QtQuick +import QtQuick.Controls + +// A folder's items one per row, as the list and each of the columns show +// them: clipped to its edges, scrolled by the wheel but not dragged, with +// Folio's scroll bar. +ListView { + clip: true + acceptedButtons: Qt.NoButton + boundsBehavior: Flickable.StopAtBounds + // No cache buffer, here or in the grid: Qt's 16 ms pause before filling + // one can leave an idle window drawing every refresh. + cacheBuffer: 0 + ScrollBar.vertical: FolioScrollBar { } +} diff --git a/src/FolderColumns.qml b/src/FolderColumns.qml index 6107dbae..162565ab 100644 --- a/src/FolderColumns.qml +++ b/src/FolderColumns.qml @@ -93,15 +93,10 @@ Item { required property string next height: row.height - ListView { + FileListView { id: column width: view.columnWidth height: parent.height - clip: true - acceptedButtons: Qt.NoButton - boundsBehavior: Flickable.StopAtBounds - cacheBuffer: 0 - ScrollBar.vertical: FolioScrollBar { } model: FolderModel { id: folder path: ancestor.path @@ -140,23 +135,18 @@ Item { } // The folder being shown: its selection is the window's. - ListView { + FileListView { id: here width: view.columnWidth height: row.height - clip: true focus: true keyNavigationEnabled: true // No cursor of its own to start with: the pane puts it back // where the last view had it, and one on the first item would // select that instead. currentIndex: -1 - acceptedButtons: Qt.NoButton - boundsBehavior: Flickable.StopAtBounds - cacheBuffer: 0 highlightFollowsCurrentItem: false model: backend.folder - ScrollBar.vertical: FolioScrollBar { } TapHandler { acceptedButtons: Qt.RightButton @@ -191,16 +181,11 @@ Item { Separator { } // A look inside the selected folder; clicking in it goes there. - ListView { + FileListView { id: inside width: view.columnWidth height: row.height visible: view.selected.isDir === true - clip: true - acceptedButtons: Qt.NoButton - boundsBehavior: Flickable.StopAtBounds - cacheBuffer: 0 - ScrollBar.vertical: FolioScrollBar { } TapHandler { acceptedButtons: Qt.RightButton onTapped: (point) => { diff --git a/src/FolderGrid.qml b/src/FolderGrid.qml index e72896b3..9c5e0cfe 100644 --- a/src/FolderGrid.qml +++ b/src/FolderGrid.qml @@ -60,6 +60,7 @@ GridView { // still scroll, which turning the view's interactive off would stop too. acceptedButtons: Qt.NoButton boundsBehavior: Flickable.StopAtBounds + // No cache buffer, as in FileListView. cacheBuffer: 0 model: backend.folder // Tiles grow with the zoom; the name and details under them don't. A diff --git a/src/FolderList.qml b/src/FolderList.qml index c5a815f5..7f76beb3 100644 --- a/src/FolderList.qml +++ b/src/FolderList.qml @@ -3,7 +3,7 @@ import QtQuick.Controls // The folder as a list: name, size and date (the date, then the size, step // aside in a narrow window). No headings: the sort menu and S sort it. -ListView { +FileListView { id: list function select(row, keep) { selecting.select(row, keep) } @@ -41,20 +41,13 @@ ListView { onTapped: (point) => list.contextMenu(selecting.menuAt(point), backend.path, point.scenePosition) } - clip: true focus: true keyNavigationEnabled: true // No cursor of its own to start with: the pane puts it back where the // last view had it, and one on the first item would select that instead. currentIndex: -1 - acceptedButtons: Qt.NoButton - boundsBehavior: Flickable.StopAtBounds - // No cache buffer, here or in the grid and columns: Qt's 16 ms pause before - // filling one can leave an idle window drawing every refresh. - cacheBuffer: 0 highlightFollowsCurrentItem: false model: backend.folder - ScrollBar.vertical: FolioScrollBar { } delegate: FileRow { width: list.width diff --git a/src/resources.qrc b/src/resources.qrc index a4118dfc..72b8f406 100644 --- a/src/resources.qrc +++ b/src/resources.qrc @@ -20,6 +20,7 @@ FolioMenuItem.qml MenuLine.qml FolioScrollBar.qml + FileListView.qml PlainButton.qml PlainField.qml SortMenu.qml