- add ctrl/cmd+shift+d shortcut
- try to fix window 1px border disappear issue
This commit is contained in:
parent
1b5bb54dce
commit
c9d5f8616f
|
@ -1,24 +1,25 @@
|
|||
:root {
|
||||
--menu-height: 200px;
|
||||
--bar-height: 53px;
|
||||
--trans-btn-height: 20px;
|
||||
--modem-btn-height: 10px;
|
||||
--body-border-widht: 1px;
|
||||
--bar-color-head: #fafafa;
|
||||
--bar-color-middle: #fafafa;
|
||||
--bar-color-tail: #fafafa;
|
||||
}
|
||||
|
||||
html {
|
||||
height: 100%;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
body {
|
||||
border: 1px solid #26a69a;
|
||||
border: var(--body-border-widht) solid #26a69a;
|
||||
height: 100%;
|
||||
background-color: #fafafa;
|
||||
}
|
||||
|
||||
:root {
|
||||
--menu-height: 200px;
|
||||
--bar-height: 53px;
|
||||
--trans-btn-height: 20px;
|
||||
--modem-btn-height: 10px;
|
||||
--bar-color-head: #fafafa;
|
||||
--bar-color-middle: #fafafa;
|
||||
--bar-color-tail: #fafafa;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
|
@ -170,6 +171,7 @@ input {
|
|||
#menu-area {
|
||||
height: var(--menu-height);
|
||||
width: calc(100%);
|
||||
/* width: 100%; */
|
||||
background-color: #fafafa;
|
||||
}
|
||||
|
||||
|
@ -183,12 +185,13 @@ input {
|
|||
}
|
||||
|
||||
#bar-area {
|
||||
width: calc(100% - 2px);
|
||||
/* width: calc(100% - 1px); */
|
||||
width: 100%;
|
||||
height: var(--bar-height);
|
||||
position: fixed;
|
||||
bottom: 1px;
|
||||
margin-bottom: 0px;
|
||||
line-height: 54px;
|
||||
/* position: fixed; */
|
||||
position: sticky;
|
||||
bottom: var(--body-border-widht);
|
||||
line-height: var(--bar-height);
|
||||
background: -webkit-linear-gradient(
|
||||
60deg,
|
||||
var(--bar-color-head),
|
||||
|
|
11
src/index.js
11
src/index.js
|
@ -89,6 +89,17 @@ ipcRenderer.on("main-cmd", (event, arg) => {
|
|||
case "Switch":
|
||||
document.getElementById("port-switch").click();
|
||||
break;
|
||||
case "ClearSwitch":
|
||||
{
|
||||
let switcher = document.getElementById("port-switch");
|
||||
switcher.click();
|
||||
if (true == switcher.checked) {
|
||||
let text = editor.getModel().getValue();
|
||||
clipboard.writeText(text);
|
||||
editor.getModel().setValue("");
|
||||
}
|
||||
}
|
||||
break;
|
||||
case "Open":
|
||||
openFile();
|
||||
break;
|
||||
|
|
|
@ -69,6 +69,11 @@ const createWindow = () => {
|
|||
mainWindow.webContents.send("main-cmd", "Switch");
|
||||
});
|
||||
|
||||
Shortcut.register(mainWindow, "CmdOrCtrl+Shift+D", () => {
|
||||
console.log("You pressed cmd/ctrl shift d");
|
||||
mainWindow.webContents.send("main-cmd", "ClearSwitch");
|
||||
});
|
||||
|
||||
Shortcut.register(mainWindow, "CmdOrCtrl+O", () => {
|
||||
console.log("You pressed cmd/ctrl o");
|
||||
mainWindow.webContents.send("main-cmd", "Open");
|
||||
|
|
Loading…
Reference in New Issue