[Libreoffice-commits] online.git: loleaflet/src
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Fri Dec 28 15:20:48 UTC 2018
loleaflet/src/control/Toolbar.js | 24 ++++++++++++++++++++++--
1 file changed, 22 insertions(+), 2 deletions(-)
New commits:
commit 1736c72f747f9c2afcc03b81f23c184c217c3ed8
Author: Andras Timar <andras.timar at collabora.com>
AuthorDate: Fri Dec 28 16:15:15 2018 +0100
Commit: Andras Timar <andras.timar at collabora.com>
CommitDate: Fri Dec 28 16:20:40 2018 +0100
Better width of About and Help popup windows on narrow and wide screens
Change-Id: I61e639a8a70282dc9e18fa1a4107f0572370947f
Reviewed-on: https://gerrit.libreoffice.org/65685
Reviewed-by: Andras Timar <andras.timar at collabora.com>
Tested-by: Andras Timar <andras.timar at collabora.com>
diff --git a/loleaflet/src/control/Toolbar.js b/loleaflet/src/control/Toolbar.js
index bdbf2a0d5..7e871a0db 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({
@@ -254,7 +264,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) {
More information about the Libreoffice-commits
mailing list