Element-web: Make the system menu dark themed when using the dark theme

Created on 15 Feb 2019  路  5Comments  路  Source: vector-im/element-web

This might be hard, because Windows.

feature p1 cosmetic minor electron uux

Most helpful comment

screen shot 2019-02-15 at 01 08 54

There are some possible solutions on macOS:

  1. Use the native dark theme API
    Works only on Mojave and later.

  2. Use the native bar tint API
    Seems to work as far as Yosemite (afaik), is used by Sublime Text, Telegram, etc. Can be tinted with any color.

  3. Ignore the title bar completely and add system buttons on top
    Idk if there's an API for that, but it looks like most electron apps pick this one so it shouldn't be hard.

All 5 comments

screen shot 2019-02-15 at 01 08 54

There are some possible solutions on macOS:

  1. Use the native dark theme API
    Works only on Mojave and later.

  2. Use the native bar tint API
    Seems to work as far as Yosemite (afaik), is used by Sublime Text, Telegram, etc. Can be tinted with any color.

  3. Ignore the title bar completely and add system buttons on top
    Idk if there's an API for that, but it looks like most electron apps pick this one so it shouldn't be hard.

This would be really, really, really appreciated!

Upon further inspection, a quick and dirty way of getting this working on macOS 10.14+ is setting the NSRequiresAquaSystemAppearance to false in the application's Info.plist file as per https://developer.apple.com/documentation/appkit/nsappearancecustomization/choosing_a_specific_appearance_for_your_app.

However, electron also apparently has built-in APIs to manage the title bar colour: https://github.com/electron/electron/issues/13387

would be nice

Was this page helpful?
0 / 5 - 0 ratings

Related issues

t3chguy picture t3chguy  路  3Comments

bagage picture bagage  路  3Comments

turt2live picture turt2live  路  3Comments

nvbln picture nvbln  路  3Comments

arthurlutz picture arthurlutz  路  3Comments