Skip to content

Commit 54662e0

Browse files
committed
fix clos button issue on linux
1 parent 8010640 commit 54662e0

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

src/main/dialog/themedwindow.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,15 @@ import { DarkThemeBGColor, LightThemeBGColor } from '../utils';
99
export class ThemedWindow {
1010
constructor(options: ThemedWindow.IOptions) {
1111
this._isDarkTheme = options.isDarkTheme;
12+
this._closable = options.closable !== false;
1213
this._window = new BrowserWindow({
1314
parent: options.parent,
1415
modal: options.modal,
1516
title: options.title,
1617
width: options.width,
1718
height: options.height,
1819
show: false,
19-
closable: options.closable !== false,
20+
closable: this._closable,
2021
resizable: options.resizable !== false,
2122
titleBarStyle: 'hidden',
2223
frame: process.platform === 'darwin',
@@ -120,7 +121,7 @@ export class ThemedWindow {
120121
<div class="page-container">
121122
<jlab-dialog-titlebar id="title-bar" data-title="${
122123
this._window.title
123-
}" data-closable="${this._window.closable.toString()}" class="${
124+
}" data-closable="${this._closable.toString()}" class="${
124125
this._isDarkTheme ? 'app-ui-dark' : ''
125126
}"></jlab-dialog-titlebar>
126127
<div id="jlab-dialog-body" class="jlab-dialog-body">
@@ -136,6 +137,7 @@ export class ThemedWindow {
136137
}
137138

138139
private _isDarkTheme: boolean;
140+
private _closable: boolean;
139141
private _window: BrowserWindow;
140142
}
141143

src/main/main.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -310,9 +310,9 @@ async function needToUpdateBundledPythonEnvInstallation(): Promise<boolean> {
310310
semver.compare(
311311
versionWithoutSuffix(jlabVersionInAppData),
312312
versionWithoutSuffix(appVersion)
313-
) === -1
313+
) >= 0
314314
) {
315-
return true;
315+
return false;
316316
}
317317
}
318318

0 commit comments

Comments
 (0)