Skip to content

Commit

Permalink
fix(files): Grid view virtual scrolling computations
Browse files Browse the repository at this point in the history
Signed-off-by: Louis Chemineau <louis@chmn.me>
  • Loading branch information
artonge committed Jul 22, 2024
1 parent 27c0bef commit 0d6190e
Show file tree
Hide file tree
Showing 23 changed files with 6 additions and 5,829 deletions.
6 changes: 2 additions & 4 deletions apps/files/src/components/FilesListVirtual.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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
Expand Down
8 changes: 4 additions & 4 deletions apps/files/src/components/VirtualList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
163 changes: 0 additions & 163 deletions dist/1521-1521.js.license

This file was deleted.

Loading

0 comments on commit 0d6190e

Please sign in to comment.