mirror of
https://github.com/4ian/GDevelop.git
synced 2025-10-15 10:19:04 +00:00
Show the preview window, when corresponding preference is enabled, above the editor but not above all windows on the screen (#3203)
This commit is contained in:
@@ -72,10 +72,13 @@ export default class LocalPreviewLauncher extends React.Component<
|
||||
)
|
||||
return;
|
||||
|
||||
const win = new BrowserWindow(this.state.previewBrowserWindowConfig);
|
||||
const browserWindowOptions = {
|
||||
...this.state.previewBrowserWindowConfig,
|
||||
parent: this.state.alwaysOnTop ? BrowserWindow.getFocusedWindow() : null,
|
||||
};
|
||||
const win = new BrowserWindow(browserWindowOptions);
|
||||
win.loadURL(`file://${this.state.previewGamePath}/index.html`);
|
||||
win.setMenuBarVisibility(this.state.hideMenuBar);
|
||||
win.setAlwaysOnTop(this.state.alwaysOnTop);
|
||||
win.webContents.on('devtools-opened', () => {
|
||||
this.setState({ devToolsOpen: true });
|
||||
});
|
||||
|
@@ -319,7 +319,7 @@ const PreferencesDialog = ({ i18n, onClose }: Props) => {
|
||||
labelPosition="right"
|
||||
label={
|
||||
<Trans>
|
||||
Always display the preview window on top of others
|
||||
Always display the preview window on top of the editor
|
||||
</Trans>
|
||||
}
|
||||
/>
|
||||
|
Reference in New Issue
Block a user