Closed smithfred closed 6 years ago
Hiding the tab bar when only one tab is open seems to works nicely, I'll add it as an optional feature. That different headerbar looks good for the white theme, but I see no point in adding a white headerbar to the dark theme. I know Epiphany (GNOME Web) does it, but it looks kinda weird when it mixes with dark elements and misses the whole point of having a dark theme. I suspect they just forgot about dark theme users when adding that feature.
I think I could add it as an optional feature too, so dark theme users can just disable it if they don't like it. Do the icons look white for you too when using a dark theme (see the screenshot below)? We can use a filter to invert them if they work consistently on all machines. Also what do you mean by that top window border, which you can't style? Could you post a screenshot?
See top edge below (only happens when unmaximised), from GNOME 3.26.
Dark 3.26 theme is pretty broken for me (also note unstyled top border - window is not maximised):
Global Dark Theme makes no difference.
Private window with dark theme:
The problem with not changing the header bar in private browsing mode, if tabs are hidden, is there's no indication that the window is private (except on the initial private browsing page) when only one tab's open. The following is a private browsing window without my header bar changes, and tabs hidden (light theme):
BTW, I don't think the Web guys forgot about Global Dark Theme, it's just considered entirely unsupported (in fact it's going away entirely in 3.28; apps have to individually implement dark themes).
TBH I think changing the address bar background colour is actually a much better approach than what the Web guys did:
The below CSS works for me for the above approach (maybe compare to the current dark theme URL bar CSS to fix the dark theme white bar issue in my previous comment?)
:root[privatebrowsingmode="temporary"] .urlbar-textbox-container {
/* Light theme */
background-image: linear-gradient(#e6c2ff, #e6c2ff) !important;
/* Dark theme */
/*background-image: linear-gradient(#25003e, #25003e) !important; /**/
}
BTW, the dark theme URL bar text style doesn't de-emphasise the non-domain part of the URL like it should.
Only issue with the above is I didn't figure out how to style the top window border so far - it remains light grey (which is a problem I also see with the dark variant of this Firefox theme).
OK, looks like "Global Dark Theme" in Tweaks doesn't affect Firefox at all, it has to be set to "Adwaita-dark".
And the top edge of the window with CSD is set according to the GTK theme, rather than being styled by Firefox.
So looks like having a custom CSD header bar colour for private browsing is a no-go anyway, since there will always be a standard-colour top border.
Edit: useful for testing without changing the theme account-wide: GTK_THEME=Adwaita:dark firefox
It's worth noting that the 'Global dark theme' switch is going to be removed in GNOME 3.28, so you will need to select 'Adwaita-dark' in any case.
Setting global theme works for me and affects Firefox too, maybe that's because I use a pretty old version of GNOME (3.18), but anyway, there isn't much we can do, I already mentioned the GTK_THEME
variable in README.
I added both hiding single tabs and coloring the URL bar for private windows, but as two separate features, in case someone wants to use one, but not the other:
hide-single-tab.css
private-urlbar.css
I am aware of the fact that hiding single tabs also hides the private browsing indicator, I included a warning in userChrome.css
. Code merged from https://github.com/smithfred/firefox-gnome-theme-3.26-layer.
Just tested on FF58, looks fine.
The following works for me (the new tab button needs to be moved to the main toolbar via FF's customise UI):
This unfortunately conflicts with using a private browsing indicator on the tab bar; the following replicates the darker private browsing header bar from Web instead:
EDIT: handled private browsing mask indicator preventing tab bar hiding.
EDIT 2: added complete CSS for dark grey header bar (Web uses the same private browsing colour even with "Global Dark Theme"). Only issue with the above is I didn't figure out how to style the top window border so far - it remains light grey (which is a problem I also see with the dark variant of this Firefox theme).
EDIT 3: fixed referencing new var globally, but only specifying it for private browsing :root.