diff options
| -rw-r--r-- | helpDialog.html | 3 | ||||
| -rw-r--r-- | vimiumFrontend.js | 4 |
2 files changed, 5 insertions, 2 deletions
diff --git a/helpDialog.html b/helpDialog.html index 652c2f91..c1fb4669 100644 --- a/helpDialog.html +++ b/helpDialog.html @@ -1,5 +1,5 @@ <!-- - This is show when typing "?". This HTML is loaded by the background page and then populated with the + This is shown when typing "?". This HTML is loaded by the background page and then populated with the latest keybindings information before displaying. --> <div id="vimiumHelpDialog"> @@ -36,7 +36,6 @@ text-align:right; font-weight:bold; color:#2f508e; - padding-right:4px; white-space:nowrap; } .vimiumDivider { diff --git a/vimiumFrontend.js b/vimiumFrontend.js index a7dd263d..70ff77c6 100644 --- a/vimiumFrontend.js +++ b/vimiumFrontend.js @@ -499,6 +499,10 @@ function showHelpDialog(html) { container.innerHTML = html; container.getElementsByClassName("closeButton")[0].addEventListener("click", hideHelpDialog, false); document.body.appendChild(container); + var dialog = document.getElementById("vimiumHelpDialog"); + var zoomFactor = currentZoomLevel / 100.0; + dialog.style.top = + Math.max((window.innerHeight - dialog.clientHeight * zoomFactor) / 2.0, 20) / zoomFactor + "px"; } function hideHelpDialog() { |
