brrd / electron-tabs

Tab component for Electron
MIT License
697 stars 130 forks source link

How to remove the system default title bar, and the effect is similar to Chrome? #180

Closed puchenhui closed 1 year ago

puchenhui commented 1 year ago

I have two questions. I hope you can help me answer them:

  1. I want to remove the default title bar of the system and replace it with electron-tabs on the left, and window operations (refresh, minimize, zoom in/out, close) on the right, and can support dragging by clicking the top window.

  2. Click Refresh to refresh the currently selected tab.

I look forward to your reply, thank you.

MCMicS commented 1 year ago

Try frameless window

const mainWindow = new BrowserWindow({
    webPreferences: {
      nodeIntegration: true,
      contextIsolation: false, // needed for Electron >= 12.x
      webviewTag: true
    },
    titleBarStyle: 'hidden'
  });

see https://www.electronjs.org/de/docs/latest/api/frameless-window

puchenhui commented 1 year ago

Thank you, it has been solved.