Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the Ability To Change Toolbar Color on Windows 11 #543

Closed
rods012 opened this issue Aug 26, 2024 · 2 comments
Closed

Add the Ability To Change Toolbar Color on Windows 11 #543

rods012 opened this issue Aug 26, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@rods012
Copy link

rods012 commented Aug 26, 2024

Problem Description

By default PWAsForFirefox doesn't use the system titlebar (which I like), but on Windows the toolbar always defaults to white.

Proposed Solution

It would be interesting if the extension either followed the system accent color settings OR at least followed the system's light or dark theme.

Additional Information

Here is my current settings as an example:
I am on Windows 11 and have dark mode active, but the toolbar continues to be white.

@rods012 rods012 added the enhancement New feature or request label Aug 26, 2024
@filips123
Copy link
Owner

By default it will use the color specified by the website in the theme_color option in the manifest or theme-color meta tag. Maybe the PWA you use specified the color to be white.

You can disable this with the "Allow web apps to override a theme (titlebar) color" option the the app browser settings, and then use normal Firefox themes to style the titlebar.

For matching with the system titlebar color, you can try this CSS, but I'm not sure if it works. You can check instructions for enabling UserChrome CSS here. In the future, I will also try to add this as an option.

@filips123
Copy link
Owner

filips123 commented Sep 15, 2024

You can use the following UserChrome CSS to use the accent color on active window:

#navigator-toolbox:not(:-moz-window-inactive),
#scrollbutton-up:not(:hover):not(:active):not(:-moz-window-inactive),
#scrollbutton-down:not(:hover):not(:active):not(:-moz-window-inactive),
.tabbrowser-tab:not(:-moz-window-inactive) {
  background: AccentColor !important;
  color: AccentColorText !important;
  fill: AccentColorText !important;
}

#firefox-view-button[open] > .toolbarbutton-icon,
.tab-background:is([selected], [multiselected]) {
  background-color: color-mix(in srgb, currentColor 18%, transparent) !important;
  background-image: none !important;
}

You will also have to disable "Allow web apps to override a theme (titlebar) color" in the app browser settings.

In the future, I might add this as an option, but I need to test it more to see what it does on other operating systems.

@filips123 filips123 moved this to In Progress in PWAsForFirefox Sep 16, 2024
@github-project-automation github-project-automation bot moved this from In Progress to Done in PWAsForFirefox Sep 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Done
Development

No branches or pull requests

3 participants
@filips123 @rods012 and others