Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Sep 13, 2024. It is now read-only.

Custom electon title bar inpire on VS Code title bar

License

NotificationsYou must be signed in to change notification settings

AlexTorresDev/custom-electron-titlebar

Repository files navigation

This project is a typescript library for electron that allows you to configure a fully customizable title bar.

CILicenseNPMInstall size

Important

This project will no longer be maintained, because I am the only one working on it and I have no free time left to review the issues and incorporate new features or update the dependencies to the latest versions.

Thanks to all the contributors and dependents of this library.

📄 Documentation

Standard Title Bar

Screenshot 1

Bottom Menu Bar

Screenshot 2

Menu

Screenshot 3

Custom color

Screenshot 4

📦 Installing

You can install this package withnpm,pnpm oryarn.

npm install custom-electron-titlebar
pnpm add custom-electron-titlebar
yarn add custom-electron-titlebar

🛠️ Usage

The implementation is done as follows:

In the main application file (main.js or .ts)

import{setupTitlebar,attachTitlebarToWindow}from"custom-electron-titlebar/main";// setup the titlebar main processsetupTitlebar();functioncreateWindow(){// Create the browser window.constmainWindow=newBrowserWindow({width:800,height:600,//frame: false, // needed if process.versions.electron < 14titleBarStyle:'hidden',/* You can use *titleBarOverlay: true* to use the original Windows controls */titleBarOverlay:true,webPreferences:{sandbox:false,preload:path.join(__dirname,'preload.js')}});    ...// attach fullScreen(f11 and not 'maximized') && focus listenersattachTitlebarToWindow(mainWindow);}

In the preload file (preload.js or .ts)

import{Titlebar}from"custom-electron-titlebar";window.addEventListener('DOMContentLoaded',()=>{// Title bar implementationnewTitlebar();});

To see the options you can include in the Title Bar constructor, such as color of elements, icons, menu position, and much more, and the methods you can use, go to thewiki

💰 Support

If you want to support my development, you can do so by donating through💖 Sponsor

📝 Contributors

I would like to express my sincere gratitude to all the people who have collaborated in the development and advancement of this project. I appreciate your contributions.

✅ License

This project is under theMIT license.


[8]ページ先頭

©2009-2025 Movatter.jp