Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to change window devtool bounds x, y, width, height #73

Open
reslear opened this issue Jun 16, 2019 · 0 comments
Open

how to change window devtool bounds x, y, width, height #73

reslear opened this issue Jun 16, 2019 · 0 comments

Comments

@reslear
Copy link

reslear commented Jun 16, 2019

Used to do so

let devtools = new BrowserWindow({
      frame : false,
      parent : mainWindow,
      skipTaskbar : true,
});      

devtools.setMenuBarVisibility(false);
mainWindow.webContents.setDevToolsWebContents(devtools.webContents);
mainWindow.webContents.openDevTools({ mode: 'detach' })

mainWindow.webContents.once('did-finish-load', function () {
      let windowBounds = mainWindow.getBounds();
      devtools.setPosition(windowBounds.x + windowBounds.width, windowBounds.y);
      devtools.setSize(windowBounds.width/2, windowBounds.height);
});

mainWindow.on('move', function () {
      let windowBounds = mainWindow.getBounds();
      devtools.setPosition(windowBounds.x + windowBounds.width, windowBounds.y);   
});

how to do with a electron-debug ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant