From a215035d0792891845eeb625ba140fd3dadfb241 Mon Sep 17 00:00:00 2001 From: Araxeus <78568641+Araxeus@users.noreply.github.com> Date: Mon, 5 Apr 2021 18:28:27 +0300 Subject: [PATCH] refactor and css fix --- providers/prompt/customTitlebar.js | 15 +++++---------- providers/prompt/darkPrompt.css | 4 +++- providers/prompt/index.js | 6 +++--- 3 files changed, 11 insertions(+), 14 deletions(-) diff --git a/providers/prompt/customTitlebar.js b/providers/prompt/customTitlebar.js index 116aa56c..6c508210 100644 --- a/providers/prompt/customTitlebar.js +++ b/providers/prompt/customTitlebar.js @@ -5,15 +5,10 @@ module.exports = () => { backgroundColor: customTitlebar.Color.fromHex("#050505"), minimizable: false, maximizable: false, - unfocusEffect: true, + menu: null }); - try { - bar.updateMenu(null); - } catch (e) { - //will always throw type error - null isn't menu, but it works - } - let container = document.querySelector('#container'); - container.style.width = '100%'; - container.style.position = 'fixed'; - container.style.border = 'unset'; + let mainStyle = document.querySelector('#container').style; + mainStyle.width = '100%'; + mainStyle.position = 'fixed'; + mainStyle.border = 'unset'; } \ No newline at end of file diff --git a/providers/prompt/darkPrompt.css b/providers/prompt/darkPrompt.css index 8b343a25..49e0f88e 100644 --- a/providers/prompt/darkPrompt.css +++ b/providers/prompt/darkPrompt.css @@ -34,7 +34,9 @@ body { } #ok:hover, -#cancel:hover { +#ok:focus, +#cancel:hover, +#cancel:focus { outline: rgba(60, 0, 0, 0.4) solid 2px; } diff --git a/providers/prompt/index.js b/providers/prompt/index.js index d6664305..0d89ebe9 100644 --- a/providers/prompt/index.js +++ b/providers/prompt/index.js @@ -50,9 +50,9 @@ function electronPrompt(options, parentWindow) { minWidth: options_.minWidth, minHeight: options_.minHeight, resizable: options_.resizable, - minimizable: false, - fullscreenable: false, - maximizable: false, + minimizable: !options_.skipTaskbar && !parentWindow && !options_.alwaysOnTop, + fullscreenable: options_.resizable, + maximizable: options_.resizable, parent: parentWindow, skipTaskbar: options_.skipTaskbar, alwaysOnTop: options_.alwaysOnTop,