loleaflet/src/control/Control.LokDialog.js |   11 +++++++++++
 1 file changed, 11 insertions(+)

New commits:
commit 35e1fae9f23f84e78453d1e4a374772306d21d7f
Author:     Szymon Kłos <szymon.k...@collabora.com>
AuthorDate: Tue Sep 22 13:05:43 2020 +0200
Commit:     Andras Timar <andras.ti...@collabora.com>
CommitDate: Tue Sep 22 20:40:05 2020 +0200

    Resize tunneled tooltips on invalidation
    
    Prevent us from showing leftovers from previous (longer) tooltip.
    
    Change-Id: Ic35238c6a9780c975f90ee76b1c12b92065b4f1b
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/103185
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Andras Timar <andras.ti...@collabora.com>

diff --git a/loleaflet/src/control/Control.LokDialog.js 
b/loleaflet/src/control/Control.LokDialog.js
index c1abe867f..2be933037 100644
--- a/loleaflet/src/control/Control.LokDialog.js
+++ b/loleaflet/src/control/Control.LokDialog.js
@@ -373,6 +373,17 @@ L.Control.LokDialog = L.Control.extend({
                        var parent = this._getParentId(e.id);
                        var rectangle = e.rectangle;
                        if (parent) { // this is a floating window
+                               if (e.rectangle && 
this._dialogs[parent].childistooltip === true) {
+                                       // resize tooltips on invalidation
+                                       left = this._dialogs[parent].childx;
+                                       top = this._dialogs[parent].childy;
+                                       width = 
parseInt(e.rectangle.split(',')[2]);
+                                       height = 
parseInt(e.rectangle.split(',')[3]);
+                                       this._dialogs[parent].childwidth = 
width;
+                                       this._dialogs[parent].childheight = 
height;
+                                       this._createDialogChild(e.id, parent, 
top, left);
+                               }
+
                                rectangle = this._createRectStr(null, 0, 0, 
this._dialogs[parent].childwidth, this._dialogs[parent].childheight);
                        } else if (rectangle) { // this is the actual dialog
                                if (this._isRectangleValid(rectangle)) {
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to