loleaflet/src/control/Toolbar.js | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-)
New commits: commit 5cf3b662ad9627b05025c7068481f8060e6d1783 Author: Andras Timar <andras.ti...@collabora.com> AuthorDate: Fri Dec 28 16:15:15 2018 +0100 Commit: Adolfo Jayme Barrientos <fit...@ubuntu.com> CommitDate: Sat Dec 29 21:23:42 2018 +0100 Better width of About and Help popup windows on narrow and wide screens Change-Id: I61e639a8a70282dc9e18fa1a4107f0572370947f Reviewed-on: https://gerrit.libreoffice.org/65687 Reviewed-by: Adolfo Jayme Barrientos <fit...@ubuntu.com> Tested-by: Adolfo Jayme Barrientos <fit...@ubuntu.com> diff --git a/loleaflet/src/control/Toolbar.js b/loleaflet/src/control/Toolbar.js index debc090d6..ba3cbb0ca 100644 --- a/loleaflet/src/control/Toolbar.js +++ b/loleaflet/src/control/Toolbar.js @@ -180,7 +180,17 @@ L.Map.include({ }, showLOKeyboardHelp: function() { - var w = window.innerWidth / 2; + var w; + var iw = window.innerWidth; + if (iw < 768) { + w = iw - 30; + } + else if (iw > 1920) { + w = 960; + } + else { + w = iw / 5 + 590; + } var map = this; $.get('loleaflet-help.html', function(data) { vex.open({ @@ -249,7 +259,17 @@ L.Map.include({ content.find('#product-name').text(productName); var productString = _('This version of %productName is powered by'); content.find('#product-string').text(productString.replace('%productName', productName)); - var w = window.innerWidth / 2; + var w; + var iw = window.innerWidth; + if (iw < 768) { + w = iw - 30; + } + else if (iw > 1920) { + w = 960; + } + else { + w = iw / 5 + 590; + } var map = this; var handler = function(event) { if (event.keyCode === 68) { _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits