fix(desktop): stop the main window growing taller on every launch (#9409)
Signed-off-by: Asish Kumar <officialasishkumar@gmail.com>
This commit is contained in:
@@ -868,6 +868,10 @@ const createChat = async (app: App, options: CreateChatOptions = {}) => {
|
|||||||
trafficLightPosition: process.platform === 'darwin' ? { x: 20, y: 16 } : undefined,
|
trafficLightPosition: process.platform === 'darwin' ? { x: 20, y: 16 } : undefined,
|
||||||
vibrancy: process.platform === 'darwin' ? 'window' : undefined,
|
vibrancy: process.platform === 'darwin' ? 'window' : undefined,
|
||||||
frame: process.platform !== 'darwin',
|
frame: process.platform !== 'darwin',
|
||||||
|
// windowStateKeeper persists the outer window bounds (getBounds), so the
|
||||||
|
// window must be restored by outer bounds too. With useContentSize the saved
|
||||||
|
// outer height is reapplied as the content height, growing the window by the
|
||||||
|
// frame height on every launch on framed platforms (#9363).
|
||||||
x: mainWindowState.x,
|
x: mainWindowState.x,
|
||||||
y: mainWindowState.y,
|
y: mainWindowState.y,
|
||||||
width: mainWindowState.width,
|
width: mainWindowState.width,
|
||||||
@@ -875,7 +879,6 @@ const createChat = async (app: App, options: CreateChatOptions = {}) => {
|
|||||||
minWidth: 480,
|
minWidth: 480,
|
||||||
minHeight: 400,
|
minHeight: 400,
|
||||||
resizable: true,
|
resizable: true,
|
||||||
useContentSize: true,
|
|
||||||
icon: path.join(__dirname, '../images/icon.icns'),
|
icon: path.join(__dirname, '../images/icon.icns'),
|
||||||
webPreferences: {
|
webPreferences: {
|
||||||
spellcheck: settings.spellcheckEnabled ?? true,
|
spellcheck: settings.spellcheckEnabled ?? true,
|
||||||
|
|||||||
Reference in New Issue
Block a user