@@ -316,7 +316,7 @@ export default defineComponent({
316316
317317 --checkbox-padding : calc ((var (--row-height ) - var (--checkbox-size )) / 2 );
318318 --checkbox-size : 24px ;
319- --clickable-area : 44 px ;
319+ --clickable-area : var ( --default-clickable-area ) ;
320320 --icon-preview-size : 32px ;
321321
322322 overflow : auto ;
@@ -687,39 +687,56 @@ export default defineComponent({
687687// Grid mode
688688tbody .files-list__tbody.files-list__tbody--grid {
689689 --half-clickable-area : calc (var (--clickable-area ) / 2 );
690- --row-width : 160px ;
691- // We use half of the clickable area as visual balance margin
692- --row-height : calc (var (--row-width ) - var (--half-clickable-area ));
693- --icon-preview-size : calc (var (--row-width ) - var (--clickable-area ));
690+ --item-padding : 16px ;
691+ --icon-preview-size : 208px ;
692+ --name-height : 32px ;
693+ --mtime-height : 16px ;
694+ --row-width : calc (var (--icon-preview-size ));
695+ --row-height : calc (var (--icon-preview-size ) + var (--name-height ) + var (--mtime-height ));
694696 --checkbox-padding : 0px ;
695697
696698 display : grid ;
697699 grid-template-columns : repeat (auto-fill , var (--row-width ));
698- grid-gap : 15px ;
699- row-gap : 15px ;
700+ gap : 22px ;
700701
701702 align-content : center ;
702703 align-items : center ;
703704 justify-content : space-around ;
704705 justify-items : center ;
706+ margin : 16px ;
707+ width : calc (100% - 32px );
705708
706709 tr {
710+ display : flex ;
711+ flex-direction : column ;
707712 width : var (--row-width );
708- height : calc ( var (--row-height ) + var ( --clickable-area ) );
713+ height : var (--row-height );
709714 border : none ;
710- border-radius : var (--border-radius );
715+ padding : var (--item-padding );
716+ box-sizing : content-box
711717 }
712718
713719 // Checkbox in the top left
714720 .files-list__row-checkbox {
715721 position : absolute ;
716722 z-index : 9 ;
717- top : 0 ;
718- left : 0 ;
723+ top : calc ( var ( --item-padding ) / 2 ) ;
724+ left : calc ( var ( --item-padding ) / 2 ) ;
719725 overflow : hidden ;
720- width : var (--clickable-area );
721- height : var (--clickable-area );
722- border-radius : var (--half-clickable-area );
726+ --checkbox-container-size : 44px ;
727+ width : var (--checkbox-container-size );
728+ height : var (--checkbox-container-size );
729+
730+ // Add a background to the checkbox so we do not see the image through it.
731+ .checkbox-radio-switch__content ::after {
732+ content : ' ' ;
733+ width : 16px ;
734+ height : 16px ;
735+ position : absolute ;
736+ left : 14px ;
737+ z-index : -1 ;
738+ background : var (--color-main-background );
739+ }
723740 }
724741
725742 // Star icon in the top right
@@ -735,36 +752,44 @@ tbody.files-list__tbody.files-list__tbody--grid {
735752 }
736753
737754 .files-list__row-name {
738- display : grid ;
739- justify-content : stretch ;
740- width : 100% ;
741- height : 100% ;
742- grid-auto-rows : var (--row-height ) var (--clickable-area );
755+ display : flex ;
756+ flex-direction : column ;
757+ width : var (--icon-preview-size );
758+ height : calc (var (--icon-preview-size ) + var (--name-height ));
759+ // Ensure that the name outline is visible.
760+ overflow : visible ;
743761
744762 span .files-list__row-icon {
745- width : 100% ;
746- height : 100% ;
747- // Visual balance, we use half of the clickable area
748- // as a margin around the preview
749- padding-top : var (--half-clickable-area );
763+ width : var (--icon-preview-size );
764+ height : var (--icon-preview-size );
765+ }
766+
767+ .files-list__row-icon-preview {
768+ border-radius : 0 ;
750769 }
751770
752771 a .files-list__row-name-link {
753- // Minus action menu
754- width : calc (100% - var (--clickable-area ));
755- height : var (--clickable-area );
772+ height : var (--name-height );
756773 }
757774
758775 .files-list__row-name-text {
759776 margin : 0 ;
760- padding-right : 0 ;
777+ // Ensure that the outline is not too close to the text.
778+ margin-left : -4px ;
779+ padding : 0px 4px ;
761780 }
762781 }
763782
783+ .files-list__row-mtime {
784+ width : var (--icon-preview-size );
785+ height : var (--mtime-height );
786+ font-size : calc (var (--default-font-size ) - 4px );
787+ }
788+
764789 .files-list__row-actions {
765790 position : absolute ;
766- right : 0 ;
767- bottom : 0 ;
791+ right : calc ( var ( --half-clickable-area ) / 2 ) ;
792+ bottom : calc ( var ( --mtime-height ) / 2 ) ;
768793 width : var (--clickable-area );
769794 height : var (--clickable-area );
770795 }
0 commit comments