From 92a2b56d4c5751da5036ef6fe5489db07a1bfb1a Mon Sep 17 00:00:00 2001 From: Arnei Date: Thu, 30 May 2024 09:44:49 +0200 Subject: [PATCH] Fix initial appearance of thumbnail view We want the boxes for the thumbnails and the videos to be roughly the same size, and display the buttons in the thumbnail boxes on the right if space allows. This was not happening when first clicking on the thumbnail view, wasting space and giving it a generally not so great look. This changes some max widths around to fix that. --- src/main/Thumbnail.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/Thumbnail.tsx b/src/main/Thumbnail.tsx index bd2b4d830..749f610e4 100644 --- a/src/main/Thumbnail.tsx +++ b/src/main/Thumbnail.tsx @@ -252,7 +252,7 @@ const ThumbnailTableRow: React.FC<{ // The "+40" comes from padding that is not included in the "getWidth" function generateRef.getWidth() + 40 : // Random default - 440; + 740; const renderPriority = (thumbnailPriority: number) => { if (isNaN(thumbnailPriority)) { @@ -299,15 +299,17 @@ const ThumbnailDisplayer: React.FC<{ track: Track; }> = ({ track }) => { const generalStyle = css({ width: "100%", - maxWidth: "457px", + maxWidth: "740px", aspectRatio: "16/9", }); const imageStyle = css({ + maxWidth: "457px", }); const placeholderStyle = css({ width: "100vw", // TODO: This is necessary to make the placeholder large enough, but prevents it from shrinking + maxWidth: "457px", backgroundColor: "grey", display: "flex", justifyContent: "center",