Skip to content

Change menubar/item color in Windows? #1250

Closed

Description

@popopome

Can I change menubar color or item's color in windows?
I can't find right guide in windows environment.

Looks like Bracket has no trouble to change those colors.

Thanks.

Activity

  1. bwin commented on Mar 16, 2015

    @bwin
    Contributor

    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#).

  2. bwin commented on Mar 17, 2015

    @bwin
    Contributor

    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...

  3. popopome commented on Mar 17, 2015

    @popopome
    Author
  4. zcbenz commented on Mar 17, 2015

    @zcbenz
    Contributor

    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.

  5. anaisbetts commented on Dec 19, 2015

    @anaisbetts
    Contributor

    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

  6. anaisbetts commented on Dec 19, 2015

    @anaisbetts
    Contributor

    We'll consider pull requests for this feature.

  7. thisKai commented on Apr 13, 2016

    @thisKai

    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 defined(OS_WIN)
      background_color_ = color_utils::GetSysSkColor(COLOR_MENUBAR);

    if I change color_utils::GetSysSkColor(COLOR_MENUBAR); to SkColorSetARGB(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 :)

  8. 4O4 commented on Oct 3, 2017

    @4O4

    We'll consider pull requests for this feature.

    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:
    poc-vscode-dark-menubar

    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!

  9. XueWei commented on Oct 6, 2017

    @XueWei

    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?

  10. 4O4 commented on Oct 7, 2017

    @4O4

    @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

  11. steffanhalv commented on Sep 1, 2018

    @steffanhalv

    @sdj01044 have you already created the pull request?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions