From dff77d3d4ff6fb0a4640c2055af9a876dbaba430 Mon Sep 17 00:00:00 2001 From: zhuzichu Date: Mon, 26 Jun 2023 11:43:49 +0800 Subject: [PATCH] update --- src/imports/FluentUI/Controls/FluTableView.qml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/imports/FluentUI/Controls/FluTableView.qml b/src/imports/FluentUI/Controls/FluTableView.qml index 21822ad3..8f314a53 100644 --- a/src/imports/FluentUI/Controls/FluTableView.qml +++ b/src/imports/FluentUI/Controls/FluTableView.qml @@ -48,6 +48,7 @@ Rectangle { } } } + ScrollView{ id:scroll_table anchors.left: header_vertical.right @@ -83,6 +84,13 @@ Rectangle { if(column === item_loader.column){ item_loader.width = w } + if(column === item_loader.column-1){ + let cellItem = table_view.itemAtCell(item_loader.column, item_loader.row) + if(cellItem){ + let cellPosition = cellItem.mapToItem(scroll_table, 0, 0) + item_loader.x = table_view.contentX + cellPosition.x + } + } return w } return implicitColumnWidth(column) @@ -106,6 +114,13 @@ Rectangle { if(row === item_loader.row){ item_loader.height = h } + if(row === item_loader.row - 1){ + var cellItem = table_view.itemAtCell(item_loader.column, item_loader.row) + if(cellItem){ + var cellPosition = cellItem.mapToItem(scroll_table, 0, 0) + item_loader.y = table_view.contentY + cellPosition.y + } + } return h } return implicitRowHeight(row)