loleaflet/src/layer/Popup.js | 10 +++++++--- loleaflet/src/layer/tile/TileLayer.js | 12 ++++++------ 2 files changed, 13 insertions(+), 9 deletions(-)
New commits: commit 7bf2bec78f3c4140cdf4614acd15916e7a4ff757 Author: László Németh <laszlo.nem...@collabora.com> Date: Thu Dec 8 00:34:17 2016 +0100 loleaflet: better user tooltip layout in Calc and Impress Now it is similar to Writer user tooltip coloring. Change-Id: I68ae24145a199957c506491d38ff50472abcf1bb diff --git a/loleaflet/src/layer/Popup.js b/loleaflet/src/layer/Popup.js index 9e8f0cf..5acc296 100644 --- a/loleaflet/src/layer/Popup.js +++ b/loleaflet/src/layer/Popup.js @@ -168,10 +168,14 @@ L.Popup = L.Layer.extend({ this._tipContainer = L.DomUtil.create('div', prefix + '-tip-container', container); this._tip = L.DomUtil.create('div', prefix + '-tip', this._tipContainer); - if (this.options.borderColor) { - this._tip.style['border'] = this._wrapper.style['border'] = '2px solid ' + this.options.borderColor; - this._closeButton.style['color'] = this.options.borderColor; + if (this.options.backgroundColor) { + this._tip.style['background-color'] = this._wrapper.style['background-color'] = this.options.backgroundColor; } + + if (this.options.color) { + this._wrapper.style['color'] = this.options.color; + } + }, _updateContent: function () { diff --git a/loleaflet/src/layer/tile/TileLayer.js b/loleaflet/src/layer/tile/TileLayer.js index e06c68b..07b4b09 100644 --- a/loleaflet/src/layer/tile/TileLayer.js +++ b/loleaflet/src/layer/tile/TileLayer.js @@ -718,10 +718,10 @@ L.TileLayer = L.GridLayer.extend({ if (!this._isEmptyRectangle(this._cellViewCursors[viewId].bounds) && this._selectedPart === viewPart) { if (!cellViewCursorMarker) { - var borderColor = L.LOUtil.rgbToHex(this._map.getViewColor(viewId)); - cellViewCursorMarker = L.rectangle(this._cellViewCursors[viewId].bounds, {fill: false, color: borderColor, weight: 2}); + var backgroundColor = L.LOUtil.rgbToHex(this._map.getViewColor(viewId)); + cellViewCursorMarker = L.rectangle(this._cellViewCursors[viewId].bounds, {fill: false, color: backgroundColor, weight: 2}); this._cellViewCursors[viewId].marker = cellViewCursorMarker; - cellViewCursorMarker.bindPopup(this._map.getViewName(viewId), {autoClose: false, autoPan: false, borderColor: borderColor}); + cellViewCursorMarker.bindPopup(this._map.getViewName(viewId), {autoClose: false, autoPan: false, backgroundColor: backgroundColor, color: 'white', closeButton: false}); } else { cellViewCursorMarker.setBounds(this._cellViewCursors[viewId].bounds); @@ -765,8 +765,8 @@ L.TileLayer = L.GridLayer.extend({ } } - var borderColor = L.LOUtil.rgbToHex(this._map.getViewColor(viewId)); - this._cellViewCursors[viewId].marker.bindPopup(this._map.getViewName(viewId), {autoClose: false, autoPan: false, borderColor: borderColor}); + var backgroundColor = L.LOUtil.rgbToHex(this._map.getViewColor(viewId)); + this._cellViewCursors[viewId].marker.bindPopup(this._map.getViewName(viewId), {autoClose: false, autoPan: false, backgroundColor: backgroundColor, color: 'white', closeButton: false}); } }, @@ -1430,7 +1430,7 @@ L.TileLayer = L.GridLayer.extend({ color: color }); // Disable autoPan, so the graphic view selection doesn't make the view jump to the popup. - viewMarker.bindPopup(this._map.getViewName(viewId), {autoClose: false, autoPan: false, borderColor: color}); + viewMarker.bindPopup(this._map.getViewName(viewId), {autoClose: false, autoPan: false, backgroundColor: color, color: 'white', closeButton: false}); this._graphicViewMarkers[viewId].marker = viewMarker; } else {
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits