You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Not sure if I understand you correctly (you could provide a screenshot of brackets doing it). But I don't think it's possible with native menus. Ok, it is possible (I just tested it in C#).
So the question is: can this be accomplished cross-platform? Otherwise it's up to debate, how many platform-specific things should go into atom-shell core. But there are some already, so this probably wouldn't kill us...
It is possible to achieve it with considerable work, but the menu API in atom-shell meant to show native menus, if you want custom menus, you should implement it with HTML and CSS, just like what Brackets did.
Being able to change the color of a menu is important in Windows. Very few applications on Windows leave the default menu bar color as the default
Yep! And they're all owner-drawn, custom menus. Implementing our own one-off, custom menus with the sole capability of changing a background color as their distinguishing feature seems ill-advised
I know this issue is closed but I noticed that chromium's menus on windows are also owner drawn, they do not match any of the native windows menu styles.
I'm no C++ guy yet but I dug around a bit out of curiosity and this file looks promising: menu_bar.cc
On line 53 and 54 is the following code:
Well, I guess it's time for me to pick up the slack 😃 I'm new to Electron's c++ codebase but I spent a some time during last week to explore and get to know it in order to implement this. I don't know yet when it's going to be completed but I won't easily give up because that's the feature I'm really missing.
Proof of concept screenshot:
I'm going to create a pull request as soon as I come up with some clean and usable implementation.
PS @thisKai Your comment with a pointer to the right file was really helpful!
Reacted by Rickey Wang, محمّد, Jarek Foksa, Ghost4Man, Steve Hartzog, Superdanby, Sam Denty, Aaron Cameron, Simon Lammer, Trevor Paley and 5 more
Reacted by thisKai, Keeley Hammond, Steffan Halvorsen and Yurii Vavrin
Activity
bwin commentedon Mar 16, 2015
Not sure if I understand you correctly (you could provide a screenshot of brackets doing it).
But I don't think it's possible with native menus.Ok, it is possible (I just tested it in C#).bwin commentedon Mar 17, 2015
So the question is: can this be accomplished cross-platform? Otherwise it's up to debate, how many platform-specific things should go into atom-shell core. But there are some already, so this probably wouldn't kill us...
popopome commentedon Mar 17, 2015
When I looked into source code, there is special code for X11. I believe window can also have same sort of code.
https://github.com/atom/atom-shell/blob/e98953a5a563648a69b6cb8535d1f27febeec887/atom/browser/ui/views/menu_bar.cc#L33-L46
zcbenz commentedon Mar 17, 2015
It is possible to achieve it with considerable work, but the menu API in atom-shell meant to show native menus, if you want custom menus, you should implement it with HTML and CSS, just like what Brackets did.
So I'm closing this as won't fix.
anaisbetts commentedon Dec 19, 2015
Yep! And they're all owner-drawn, custom menus. Implementing our own one-off, custom menus with the sole capability of changing a background color as their distinguishing feature seems ill-advised
anaisbetts commentedon Dec 19, 2015
We'll consider pull requests for this feature.
thisKai commentedon Apr 13, 2016
I know this issue is closed but I noticed that chromium's menus on windows are also owner drawn, they do not match any of the native windows menu styles.
I'm no C++ guy yet but I dug around a bit out of curiosity and this file looks promising: menu_bar.cc
On line 53 and 54 is the following code:
if I change
color_utils::GetSysSkColor(COLOR_MENUBAR);toSkColorSetARGB(255, 0, 0, 0);the menubar becomes black, but the text stays black.If I have any free time I'll keep on digging but if this turns out to be a useful clue for anyone else I'd be even happier :)
4O4 commentedon Oct 3, 2017
Well, I guess it's time for me to pick up the slack 😃 I'm new to Electron's c++ codebase but I spent a some time during last week to explore and get to know it in order to implement this. I don't know yet when it's going to be completed but I won't easily give up because that's the feature I'm really missing.
Proof of concept screenshot:

I'm going to create a pull request as soon as I come up with some clean and usable implementation.
PS @thisKai Your comment with a pointer to the right file was really helpful!
XueWei commentedon Oct 6, 2017
Although this thread is about menu color, I'd ask if there is any way to change the default font of menu for CJK languages?
4O4 commentedon Oct 7, 2017
@XueWei I'm afraid that this is a bit more problematic. Looks like the only method I found in sources which can be used to set the font is deprecated and scheduled for removal in Chromium (or already removed). See: https://bugs.chromium.org/p/chromium/issues/detail?id=633986
steffanhalv commentedon Sep 1, 2018
@sdj01044 have you already created the pull request?