diff --git a/src/ui/Prompts.js b/src/ui/Prompts.js index 439fbf0..b1d08de 100644 --- a/src/ui/Prompts.js +++ b/src/ui/Prompts.js @@ -63,8 +63,8 @@ var Prompts = (() => { checks: [], buttons: [_("Ok"), _("Cancel")], multiple: "close", // or "queue", or "focus" - width: 400, - height: 300, + width: 500, + height: 400, alwaysOnTop: true, }, async prompt(features) { diff --git a/src/ui/prompt.css b/src/ui/prompt.css index abada75..7d9f8a7 100644 --- a/src/ui/prompt.css +++ b/src/ui/prompt.css @@ -6,6 +6,7 @@ body { color: #222; margin: 0px; padding: 8px; + background: linear-gradient(to bottom, #e4f5fc 0%,#bfe8f9 41%,#9fd8ef 90%,#2ab0ed 100%) no-repeat; } #header { @@ -13,10 +14,9 @@ body { margin: 0; line-height: 24px; color: #048; - position: relative; font-size: 24px; z-index: 500; - padding: 8px; + padding: 8px 8px 0 8px; display: block; background: url(/img/icon96.png) no-repeat top right; height: 96px; @@ -25,23 +25,21 @@ body { #title { margin-right: 96px; font-size: 24px; - position: absolute; bottom: 0; top: 0; } #main { - background: linear-gradient(to bottom, #e4f5fc 0%,#bfe8f9 41%,#9fd8ef 90%,#2ab0ed 100%) no-repeat; display: flex; flex-direction: column; align-items: center; - padding: 120px 16px 16px 16px; + padding: 0 16px; top: 0; left: 0; right:0; bottom: 0; - position: fixed; justify-content: center; + overflow: auto; } #message { flex-grow: 1; diff --git a/src/ui/prompt.js b/src/ui/prompt.js index f19aac9..7c45065 100644 --- a/src/ui/prompt.js +++ b/src/ui/prompt.js @@ -88,4 +88,18 @@ for (let b of document.querySelectorAll("#buttons button")) { b.addEventListener("click", buttonClicked); } + + let resize = async () => { + let win = await browser.windows.getCurrent(); + let delta = document.documentElement.offsetHeight - window.innerHeight; + await browser.windows.update(win.id, { + width: win.width, height: win.height + delta, + left: win.left, top: win.top - Math.round(delta / 2) + }); + } + if (document.readyState === "complete") { + resize(); + } else { + window.addEventListener("load", resize); + } })();