From ad58c5c83041169aacf38772fb75ce6d1f085f09 Mon Sep 17 00:00:00 2001 From: "E.Smith" <31170571+azlm8t@users.noreply.github.com> Date: Tue, 2 Oct 2018 23:28:32 +0100 Subject: [PATCH] ui: Use background-size to scale fanart to fit dvr dialog box. Previously the fanart could be too big for the dialog. Now we scale to fit the dialog. We use 'cover' which can make the image slightly exceed the dialog dimensions, compared to 'contain' which would leave space at the top/bottom if the fanart is an odd dimension. The 'cover' seems better with the fanart I've seen so far. --- src/webui/static/app/dvr.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/webui/static/app/dvr.js b/src/webui/static/app/dvr.js index 950fbe10b..c36957de7 100644 --- a/src/webui/static/app/dvr.js +++ b/src/webui/static/app/dvr.js @@ -222,6 +222,10 @@ tvheadend.dvrDetails = function(grid, index) { 'position': 'relative', 'width' : '100%', 'height': '100%', + // This causes background image to scale on css3 with aspect ratio, image + // can overflow, vs. 'contain' which will leave blank space top+bottom to + // ensure image is fully displayed in the window + 'background-size': 'cover', }); } // Have fanart div -- 2.47.2