[Libreoffice-commits] online.git: loleaflet/css loleaflet/src

gokaysatir (via logerrit) logerrit at kemper.freedesktop.org
Tue Aug 25 20:08:55 UTC 2020


 loleaflet/css/device-mobile.css               |    2 +-
 loleaflet/src/control/Control.PartsPreview.js |   10 +++-------
 2 files changed, 4 insertions(+), 8 deletions(-)

New commits:
commit a5e77d71c25d64fd9d2458a9de90e64acc87a4a9
Author:     gokaysatir <gokaysatir at collabora.com>
AuthorDate: Tue Aug 25 13:42:05 2020 +0300
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Tue Aug 25 22:08:35 2020 +0200

    Loleaflet: Impress image previews are adjusted.
    
    Change-Id: I0c333b58e823702678c4c292de2f58adabbdb3c1
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/101319
    Tested-by: Jenkins
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Andras Timar <andras.timar at collabora.com>

diff --git a/loleaflet/css/device-mobile.css b/loleaflet/css/device-mobile.css
index 2efd9d6cf..69c20c215 100644
--- a/loleaflet/css/device-mobile.css
+++ b/loleaflet/css/device-mobile.css
@@ -696,7 +696,7 @@ td[id^=tb_spreadsheet-toolbar_item]:focus table.w2ui-button div.w2ui-icon, td[id
 
 .preview-frame-portrait {
 	max-height: 60px;
-	max-width: initial;
+	max-width: 100%;
 	display: table-cell;
 	padding-right: 1em;
 }
diff --git a/loleaflet/src/control/Control.PartsPreview.js b/loleaflet/src/control/Control.PartsPreview.js
index 7d4648f7d..718d65b50 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.isDesktop() ? 60 : 180,
-		maxHeight: !window.mode.isDesktop() ? 60 : 180
+		maxWidth: window.mode.isDesktop() ? 180: (window.mode.isTablet() ? 120: 60),
+		maxHeight: window.mode.isDesktop() ? 180: (window.mode.isTablet() ? 120: 60)
 	},
 	partsFocused: false,
 
@@ -129,6 +129,7 @@ L.Control.PartsPreview = L.Control.extend({
 					this._previewTiles.push(this._createPreview(i, e.partNames[i], bottomBound));
 				}
 				L.DomUtil.addClass(this._previewTiles[selectedPart], 'preview-img-currentpart');
+				this._onScroll(); // Load previews.
 				this._previewInitialized = true;
 			}
 			else
@@ -314,11 +315,6 @@ 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) {


More information about the Libreoffice-commits mailing list