cawa-93 / vite-electron-builder

Secure boilerplate for Electron app based on Vite. TypeScript + Vue/React/Angular/Svelte/Vanilla
MIT License
2.4k stars 261 forks source link

Feature - remember window bounds on window.show() #992

Closed CRdeGraaf closed 6 months ago

CRdeGraaf commented 8 months ago

Remembers the window size and position for devmode and production respectively. Uses local user storage like appdata to persist this.

It fixes an important issue for me, which is windows constantly jumping around on every file save, causing frustration, especially on multi-monitor setups.

devmode is seperated from production as many people will keep a different window width when devtools are open.

it is a small QoL feature, but still requires electron-store or similar new util dependancy. I don't know if that is a deal-breaker for your templating philosophy, but i felt like offering the contribution nonetheless.

Thanks for the nice boilerplate.

cawa-93 commented 6 months ago

This may be a useful feature, but I want to keep this template as less dependencies as possible. So you can re-implement this feature without third-paty dependencies and open new PR. Or, post your showcase into the discussion section.