Comments (1)
You should use titlebar.refreshMenu(), an asynchronous method that refreshes the menu with what is in Menu.getApplicationMenu(), after updating the menu with the sample code you showed above.
from custom-electron-titlebar.
Related Issues (20)
- [Windows] Hovering menu two options are highlighted HOT 5
- Cannot hide menu or change menu HOT 2
- Problem that two menus are not displayed. HOT 2
- Link to titlebar documentation is dead HOT 2
- The icon option crashes the toolbar
- Window Maximization button not change when window is maximized
- When I mouse-click the titlebar, the window does not get focus
- ERR_PACKAGE_PATH_NOT_EXPORTED on build
- Not sure how to add menu items HOT 1
- [Bug] Linux titlebar is broken? HOT 1
- Focus vc NonFocus revist? HOT 4
- Use getMenu instead of getApplicationMenu
- updateMenu should be public HOT 1
- OS detection fails in packaged/production builds, causing `undefined` instead of menu icons
- Title moves to the left after resizing HOT 5
- The submenus are not aligned with the title menu HOT 2
- [New Feature] Customize the title bar right-click menu and right-click events
- Click eventListener is not working for menu that doesn't have any submenu
- BUG: Window minWidth and minHeight not working (FIX) HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from custom-electron-titlebar.