From a653083eb4eca70e4e99757eded1e8550d9cbc0a Mon Sep 17 00:00:00 2001 From: Xen Date: Mon, 1 Jun 2020 20:19:49 +0800 Subject: [PATCH] try to fix right border disappear issue --- src/index.css | 2 +- src/main.js | 20 ++++++++++++++------ 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/src/index.css b/src/index.css index ba87ad6..f544215 100755 --- a/src/index.css +++ b/src/index.css @@ -6,7 +6,7 @@ --bar-height: 53px; --trans-btn-height: 20px; --modem-btn-height: 10px; - --body-border-widht: 1px; + --body-border-widht: 1pt; --bar-color-head: #fafafa; --bar-color-middle: #fafafa; --bar-color-tail: #fafafa; diff --git a/src/main.js b/src/main.js index 56d64aa..fc7ff5b 100755 --- a/src/main.js +++ b/src/main.js @@ -58,12 +58,20 @@ const createWindow = () => { mainWindow = null; }); - mainWindow.on("restore", () => { - mainWindow.setContentSize( - store.get("window.width", widthDefault), - store.get("window.height", heightDefault) - ); - }); + // Prevent window size change after min-restore but introduce extra latch + // mainWindow.on("restore", () => { + // mainWindow.setContentSize( + // store.get("window.width", widthDefault), + // store.get("window.height", heightDefault) + // ); + // }); + + // Can fix right 1px border disappear issue which is caused by screen scale. + // With price of much extra latch when resizing or moving window + // mainWindow.on("resize", () => { + // let rect = mainWindow.getBounds(); + // mainWindow.setBounds(rect); + // }); Shortcut.register(mainWindow, "CmdOrCtrl+X", () => { console.log("Pressed cmd/ctrl x");