From 52d87122ba88c28c551f5863c82d2ac96782303d Mon Sep 17 00:00:00 2001 From: Varun Patil Date: Fri, 20 Oct 2023 09:33:28 -0700 Subject: [PATCH] fix(files): correct item height 1. grid: typo? The icon size is 160 - 44 + (44 / 2) = 138px 2. non-grid: border is already included in height because the tr is a border-box (made this explicit to be safe) Signed-off-by: Varun Patil --- apps/files/src/components/FilesListVirtual.vue | 1 + apps/files/src/components/VirtualList.vue | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/files/src/components/FilesListVirtual.vue b/apps/files/src/components/FilesListVirtual.vue index ba453b5be1171..5ff8b0360c26b 100644 --- a/apps/files/src/components/FilesListVirtual.vue +++ b/apps/files/src/components/FilesListVirtual.vue @@ -366,6 +366,7 @@ export default Vue.extend({ width: 100%; user-select: none; border-bottom: 1px solid var(--color-border); + box-sizing: border-box; user-select: none; height: var(--row-height); } diff --git a/apps/files/src/components/VirtualList.vue b/apps/files/src/components/VirtualList.vue index 53ff552235c38..a579cfcc8f396 100644 --- a/apps/files/src/components/VirtualList.vue +++ b/apps/files/src/components/VirtualList.vue @@ -104,7 +104,7 @@ export default Vue.extend({ itemHeight() { // Align with css in FilesListVirtual // 138px + 44px (name) + 15px (grid gap) - return this.gridMode ? (160 + 44 + 15) : 56 + return this.gridMode ? (138 + 44 + 15) : 55 }, // Grid mode only itemWidth() {