try to fix right border disappear issue
This commit is contained in:
parent
e4349a5a73
commit
a653083eb4
|
@ -6,7 +6,7 @@
|
||||||
--bar-height: 53px;
|
--bar-height: 53px;
|
||||||
--trans-btn-height: 20px;
|
--trans-btn-height: 20px;
|
||||||
--modem-btn-height: 10px;
|
--modem-btn-height: 10px;
|
||||||
--body-border-widht: 1px;
|
--body-border-widht: 1pt;
|
||||||
--bar-color-head: #fafafa;
|
--bar-color-head: #fafafa;
|
||||||
--bar-color-middle: #fafafa;
|
--bar-color-middle: #fafafa;
|
||||||
--bar-color-tail: #fafafa;
|
--bar-color-tail: #fafafa;
|
||||||
|
|
20
src/main.js
20
src/main.js
|
@ -58,12 +58,20 @@ const createWindow = () => {
|
||||||
mainWindow = null;
|
mainWindow = null;
|
||||||
});
|
});
|
||||||
|
|
||||||
mainWindow.on("restore", () => {
|
// Prevent window size change after min-restore but introduce extra latch
|
||||||
mainWindow.setContentSize(
|
// mainWindow.on("restore", () => {
|
||||||
store.get("window.width", widthDefault),
|
// mainWindow.setContentSize(
|
||||||
store.get("window.height", heightDefault)
|
// 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", () => {
|
Shortcut.register(mainWindow, "CmdOrCtrl+X", () => {
|
||||||
console.log("Pressed cmd/ctrl x");
|
console.log("Pressed cmd/ctrl x");
|
||||||
|
|
Loading…
Reference in New Issue