diff options
author | Louis Chemineau <louis@chmn.me> | 2024-07-22 17:35:27 +0200 |
---|---|---|
committer | Louis Chemineau <louis@chmn.me> | 2024-07-24 09:38:51 +0200 |
commit | 1aeb3f328bf0957ea9dace87a47b6b50d45d43df (patch) | |
tree | e93746e2829e53da8c2788950beab6f2b450e54b /apps/files | |
parent | ddad7b48eb567bd799efbc734040f6ed103050f4 (diff) | |
download | nextcloud-server-1aeb3f328bf0957ea9dace87a47b6b50d45d43df.tar.gz nextcloud-server-1aeb3f328bf0957ea9dace87a47b6b50d45d43df.zip |
fix(files): Grid view virtual scrolling computations
Signed-off-by: Louis Chemineau <louis@chmn.me>
Diffstat (limited to 'apps/files')
-rw-r--r-- | apps/files/src/components/FilesListVirtual.vue | 6 | ||||
-rw-r--r-- | apps/files/src/components/VirtualList.vue | 8 |
2 files changed, 6 insertions, 8 deletions
diff --git a/apps/files/src/components/FilesListVirtual.vue b/apps/files/src/components/FilesListVirtual.vue index 6110b5b0674..4bac5f84db6 100644 --- a/apps/files/src/components/FilesListVirtual.vue +++ b/apps/files/src/components/FilesListVirtual.vue @@ -691,13 +691,12 @@ tbody.files-list__tbody.files-list__tbody--grid { --icon-preview-size: 166px; --name-height: 32px; --mtime-height: 16px; - --row-width: calc(var(--icon-preview-size)); - --row-height: calc(var(--icon-preview-size) + var(--name-height) + var(--mtime-height)); + --row-width: calc(var(--icon-preview-size) + var(--item-padding) * 2); + --row-height: calc(var(--icon-preview-size) + var(--name-height) + var(--mtime-height) + var(--item-padding) * 2); --checkbox-padding: 0px; display: grid; grid-template-columns: repeat(auto-fill, var(--row-width)); - gap: 22px; align-content: center; align-items: center; @@ -714,7 +713,6 @@ tbody.files-list__tbody.files-list__tbody--grid { border: none; border-radius: var(--border-radius-large); padding: var(--item-padding); - box-sizing: content-box; } // Checkbox in the top left diff --git a/apps/files/src/components/VirtualList.vue b/apps/files/src/components/VirtualList.vue index be7b21fc299..daf021e8ed5 100644 --- a/apps/files/src/components/VirtualList.vue +++ b/apps/files/src/components/VirtualList.vue @@ -131,13 +131,13 @@ export default Vue.extend({ itemHeight() { // Align with css in FilesListVirtual - // 166px + 32px (name) + 16px (mtime) + 16px (padding) + 22px (grid gap) - return this.gridMode ? (166 + 32 + 16 + 16 + 22) : 55 + // 166px + 32px (name) + 16px (mtime) + 16px (padding) + return this.gridMode ? (166 + 32 + 16 + 16) : 55 }, // Grid mode only itemWidth() { - // 166px + 16px padding + 22px grid gap - return 166 + 16 + 22 + // 166px + 16px padding + return 166 + 16 }, rowCount() { |