loleaflet/css/device-mobile.css | 6 +++--- loleaflet/src/control/Control.PartsPreview.js | 15 ++++++++++----- 2 files changed, 13 insertions(+), 8 deletions(-)
New commits: commit e6b3149825e19b69e8381651b0e3dbddc371a703 Author: Henry Castro <hcas...@collabora.com> AuthorDate: Thu Jun 11 09:35:25 2020 -0400 Commit: Henry Castro <hcas...@collabora.com> CommitDate: Tue Aug 11 21:46:27 2020 +0200 android: fix thumbnails images when portrait orientation is set Change-Id: I70aee6b569f78795487cbff736130e0e7413e852 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/96123 Tested-by: Jenkins Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Henry Castro <hcas...@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100553 diff --git a/loleaflet/css/device-mobile.css b/loleaflet/css/device-mobile.css index ca7007b6a..0343a3a94 100644 --- a/loleaflet/css/device-mobile.css +++ b/loleaflet/css/device-mobile.css @@ -584,14 +584,14 @@ td[id^=tb_spreadsheet-toolbar_item]:focus table.w2ui-button div.w2ui-icon, td[id /* Related to slidesorter */ /* Show slidesorter beyond 768px only */ #presentation-controls-wrapper { - top: initial; + top: 41px; left: initial; bottom: 33px; max-width: initial; } #presentation-controls-wrapper.readonly { - top: initial; + top: 41px; bottom: 0px; } @@ -691,7 +691,6 @@ td[id^=tb_spreadsheet-toolbar_item]:focus table.w2ui-button div.w2ui-icon, td[id .preview-img-portrait { min-width: 37px; max-width: 60px; - max-height: 45px; margin: 0px; } @@ -721,6 +720,7 @@ td[id^=tb_spreadsheet-toolbar_item]:focus table.w2ui-button div.w2ui-icon, td[id } #document-container.landscape.parts-preview-document { + top: 41px; left: 66px !important; bottom: 33px; } diff --git a/loleaflet/src/control/Control.PartsPreview.js b/loleaflet/src/control/Control.PartsPreview.js index 6143ee28b..da01e151d 100644 --- a/loleaflet/src/control/Control.PartsPreview.js +++ b/loleaflet/src/control/Control.PartsPreview.js @@ -12,8 +12,8 @@ L.Control.PartsPreview = L.Control.extend({ frameClass: '', axis: '', allowOrientation: true, - maxWidth: (window.mode.isMobile() || window.mode.isTablet()) ? 60 : 180, - maxHeight: (window.mode.isMobile() || window.mode.isTablet()) ? 60 : 180 + maxWidth: !window.mode.isDesktop() ? 60 : 180, + maxHeight: !window.mode.isDesktop() ? 60 : 180 }, partsFocused: false, @@ -120,7 +120,7 @@ L.Control.PartsPreview = L.Control.extend({ frame.setAttribute('draggable', false); frame.setAttribute('id', 'first-drop-site'); - if (!window.mode.isMobile()) { + if (window.mode.isDesktop()) { L.DomUtil.setStyle(frame, 'height', '20px'); L.DomUtil.setStyle(frame, 'margin', '0em'); } @@ -206,7 +206,7 @@ L.Control.PartsPreview = L.Control.extend({ img.hash = hashCode; img.src = L.Icon.Default.imagePath + '/preview_placeholder.png'; img.fetched = false; - if (window.mode.isMobile() || window.mode.isTablet()) { + if (!window.mode.isDesktop()) { (new Hammer(img, {recognizers: [[Hammer.Press]]})) .on('press', function (e) { if (this._map.isPermissionEdit()) { @@ -302,7 +302,7 @@ L.Control.PartsPreview = L.Control.extend({ var previewImgMinWidth = Math.round(parseFloat(L.DomUtil.getStyle(img, 'min-width'))); var imgHeight = imgSize.height; var imgWidth = imgSize.width; - if (imgSize.width < previewImgMinWidth) + if (imgSize.width < previewImgMinWidth && window.mode.isDesktop()) imgHeight = Math.round(imgHeight * previewImgMinWidth / imgSize.width); var previewFrameBB = img.parentElement.getBoundingClientRect(); if (this._direction === 'x') { @@ -315,6 +315,11 @@ L.Control.PartsPreview = L.Control.extend({ this._previewFrameHeight = imgHeight + 2 * previewImgBorder; } } + + if (!window.mode.isDesktop() && imgSize) { + L.DomUtil.setStyle(img, 'width', imgSize.width + 'px'); + L.DomUtil.setStyle(img, 'height', imgSize.height + 'px'); + } }, _setPart: function (e) { _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits