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

Dennis Francis (via logerrit) logerrit at kemper.freedesktop.org
Fri May 1 02:16:28 UTC 2020


 loleaflet/src/layer/tile/TileLayer.js |   14 ++++----------
 1 file changed, 4 insertions(+), 10 deletions(-)

New commits:
commit 2e0f1402028d60344247605223e8a63fed70e7d4
Author:     Dennis Francis <dennis.francis at collabora.com>
AuthorDate: Thu Apr 30 17:28:39 2020 +0530
Commit:     Dennis Francis <dennis.francis at collabora.com>
CommitDate: Fri May 1 04:16:09 2020 +0200

    fix validation dropdown icon size
    
    There is no need to have a 'maxHeight' for the icon as we don't mirror
    the core's button anymore. The height of the icon follows the cell height,
    and lets make the width follow it too, so that the icon is nicely
    scaled with zoom (the icon used has a 1:1 aspect ratio).
    
    Change-Id: I175ad98f6a1306fabd003eee7fda9652f5835995
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/93211
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Dennis Francis <dennis.francis at collabora.com>

diff --git a/loleaflet/src/layer/tile/TileLayer.js b/loleaflet/src/layer/tile/TileLayer.js
index adf022776..2918f8bf0 100644
--- a/loleaflet/src/layer/tile/TileLayer.js
+++ b/loleaflet/src/layer/tile/TileLayer.js
@@ -3038,18 +3038,12 @@ L.TileLayer = L.GridLayer.extend({
 			this._map.removeLayer(this._dropDownButton);
 	},
 
-	_getDropDownMarker: function (height) {
-		if (height) {
-			var maxHeight = 27; // it matches the max height of the same control in core
-			var topMargin = 0;
-			if (height > maxHeight) {
-				topMargin = height - maxHeight;
-				height = maxHeight;
-			}
+	_getDropDownMarker: function (dropDownSize) {
+		if (dropDownSize) {
 			var icon =  L.divIcon({
 				className: 'spreadsheet-drop-down-marker',
-				iconSize: [undefined, height],
-				iconAnchor: [0, -topMargin]
+				iconSize: [dropDownSize, dropDownSize],
+				iconAnchor: [0, 0]
 			});
 			this._dropDownButton.setIcon(icon);
 		}


More information about the Libreoffice-commits mailing list