[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4' - loleaflet/src

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Fri Apr 19 15:14:40 UTC 2019


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

New commits:
commit 40bf45ada9feb9e6e0aab3c7a018856d8e65b4a2
Author:     Tor Lillqvist <tml at collabora.com>
AuthorDate: Fri Apr 19 18:11:16 2019 +0300
Commit:     Tor Lillqvist <tml at collabora.com>
CommitDate: Fri Apr 19 18:13:53 2019 +0300

    tdf#124235: Make the combo box list be attached to the widget
    
    Don't multiply 'top' by the dpi scale factor in the iOS app.
    
    I see the same problem in Safari on a Retina Mac against normal
    online, too, so possibly the multiplication should never be done?

diff --git a/loleaflet/src/control/Control.LokDialog.js b/loleaflet/src/control/Control.LokDialog.js
index 1836bf7a2..3282b9d2e 100644
--- a/loleaflet/src/control/Control.LokDialog.js
+++ b/loleaflet/src/control/Control.LokDialog.js
@@ -658,7 +658,17 @@ L.Control.LokDialog = L.Control.extend({
 		var dialogTitle = $('.lokdialog_notitle');
 		if (dialogTitle != null && dialogTitle.length == 0) {
 			var dialogTitleBar = $('.ui-dialog-titlebar');
-			top += dialogTitleBar.outerHeight() * L.getDpiScaleFactor();
+			// tdf#124235: At least in the iOS app, multiplying with
+			// L.getDpiScaleFactor() below causes the child of a combo box to be
+			// displaced from the fixed part. I see the same problem also when using
+			// Safari on a Retuna Mac against normal online. But as I don't know whether
+			// it happens also for other browsers on other platforms on hidpi displays,
+			// I will fix this for the iOS app only for now.
+			if (!window.ThisIsTheiOSApp) {
+				top += dialogTitleBar.outerHeight() * L.getDpiScaleFactor();
+			} else {
+				top += dialogTitleBar.outerHeight();
+			}
 		}
 
 		floatingCanvas.id = strId + '-floating';


More information about the Libreoffice-commits mailing list