From: E.Smith <31170571+azlm8t@users.noreply.github.com> Date: Tue, 2 Oct 2018 22:28:32 +0000 (+0100) Subject: ui: Use background-size to scale fanart to fit dvr dialog box. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ad58c5c83041169aacf38772fb75ce6d1f085f09;p=thirdparty%2Ftvheadend.git 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. --- 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