From 222a4bd4ac7c3d0ce76564a3f0cad9237d121b87 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Fri, 25 Sep 2015 16:58:56 +0200 Subject: [PATCH] Scale portrait images correctly --- apps/files/css/detailsView.css | 2 +- apps/files/js/mainfileinfodetailview.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/files/css/detailsView.css b/apps/files/css/detailsView.css index faa26678562..f1522c5f775 100644 --- a/apps/files/css/detailsView.css +++ b/apps/files/css/detailsView.css @@ -40,7 +40,7 @@ height: auto; } -#app-sidebar .image.landscape .thumbnail::before { +#app-sidebar .image .thumbnail::before { content: ''; display: block; padding-bottom: 56.25%; /* sets height of .thumbnail to 9/16 of the width */ diff --git a/apps/files/js/mainfileinfodetailview.js b/apps/files/js/mainfileinfodetailview.js index c15b1fb2d63..7f2528737d5 100644 --- a/apps/files/js/mainfileinfodetailview.js +++ b/apps/files/js/mainfileinfodetailview.js @@ -186,7 +186,7 @@ // when we dont have a preview we show the mime icon in the error handler $iconDiv.css({ 'background-image': 'url("' + previewUrl + '")', - height: (isLandscape(img) && targetHeight > smallPreviewSize)? 'auto': targetHeight + height: (targetHeight > smallPreviewSize)? 'auto': targetHeight }); }.bind(this), error: function () {