fix(files): Grid view virtual scrolling computations

Signed-off-by: Louis Chemineau <louis@chmn.me>
This commit is contained in:
Louis Chemineau 2024-07-22 17:35:27 +02:00 committed by Ferdinand Thiessen
parent 35a00d46cd
commit e19e6b720e
No known key found for this signature in database
GPG key ID: 45FAE7268762B400
2 changed files with 6 additions and 8 deletions

View file

@ -752,13 +752,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;
@ -775,7 +774,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

View file

@ -123,13 +123,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() {