flathub / com.brave.Browser

https://flathub.org/apps/details/com.brave.Browser
Mozilla Public License 2.0
41 stars 17 forks source link

Dark theme doesn't work with GTK theme #123

Closed franciscot closed 1 year ago

franciscot commented 2 years ago

Hi, I can't get dark theme to work with gtk in brave.

Dark theme with GTK: brave_gtk_dark_theme

and classic theme: brave_classic_dark_theme

On Snap, GTK dark theme is working. My desktop (plasma) is setting with dark aspect and theme, included gtk apps.

My system: Operating System: KDE neon 5.24 KDE Plasma Version: 5.24.4 KDE Frameworks Version: 5.93.0 Qt Version: 5.15.3 Kernel Version: 5.13.0-39-generic (64-bit) Graphics Platform: X11 Processors: 12 × Intel® Core™ i7-10750H CPU @ 2.60GHz Memory: 15.5 GiB of RAM Graphics Processor: NVIDIA GeForce GTX 1650/PCIe/SSE2

Thank you.

TheEvilSkeleton commented 2 years ago

Can you run flatpak update in the terminal? It should find org.gtk.Gtk3theme.Adwaita-dark. If not, what happens when you run flatpak list | grep org.gtk.Gtk3theme.Adwaita-dark?

franciscot commented 2 years ago

Can you run flatpak update in the terminal? It should find org.gtk.Gtk3theme.Adwaita-dark. If not, what happens when you run flatpak list | grep org.gtk.Gtk3theme.Adwaita-dark?

flatpak update say nothing to do. It's updated.

org.gtk.Gtk3theme.Adwaita-dark is not installed.

I have intalled this:

Freedesktop SDK  org.freedesktop.Sdk  21.08.12  21.08  system
GNOME Application Platform version 42  org.gnome.Platform  42  system
Breeze GTK theme  org.gtk.Gtk3theme.Breeze  3.22   system
KDE Application Platform   org.kde.Platform  5.15-21.08   system

I intalled org.gtk.Gtk3theme.Adwaita-dark and org.gtk.Gtk3theme.Breeze-Dark, but nothing changes.

ghost commented 2 years ago

Can you run flatpak update in the terminal? It should find org.gtk.Gtk3theme.Adwaita-dark. If not, what happens when you run flatpak list | grep org.gtk.Gtk3theme.Adwaita-dark?

flatpak update say nothing to do. It's updated.

org.gtk.Gtk3theme.Adwaita-dark is not installed.

I have intalled this:

Freedesktop SDK  org.freedesktop.Sdk  21.08.12  21.08  system
GNOME Application Platform version 42  org.gnome.Platform  42  system
Breeze GTK theme  org.gtk.Gtk3theme.Breeze  3.22   system
KDE Application Platform   org.kde.Platform  5.15-21.08   system

I intalled org.gtk.Gtk3theme.Adwaita-dark and org.gtk.Gtk3theme.Breeze-Dark, but nothing changes.

you can try to check you theme name and install both version (dark and light) for instance i use (adw-gtk3) and i had to install on my (.local/share/theme) both version (dark and light) and on flatpak dark and light before it work.

fixed it for me so cost nothing to test.

mrust1219 commented 1 year ago

I would like for someone to revisit this bug. The flatpak org.gtk.Gtk3theme.Breeze package works perfectly fine for Firefox flatpak, for both light and dark mode. Brave browser flatpak seems to not work this way. I have even set flatpak override com.brave.Browser --env GTK_THEME=Breeze, and it still will not use the dark mode. Are there any work arounds for this, or will the bug be addressed?

ghost commented 1 year ago

I would like for someone to revisit this bug. The flatpak org.gtk.Gtk3theme.Breeze package works perfectly fine for Firefox flatpak, for both light and dark mode. Brave browser flatpak seems to not work this way. I have even set flatpak override com.brave.Browser --env GTK_THEME=Breeze, and it still will not use the dark mode. Are there any work arounds for this, or will the bug be addressed?

i just found sad there is no support like in firefox back in the day to add manual css to completly change the ui.

if they allowed that (chromium) the community will have like 3 week to release CSS to integrate in all distro major DE (aka firefox gnome theme etc).

rany2 commented 1 year ago

I can't reproduce this unfortunately. Both the classic and GTK theme work as expected and the dark theme works fine.

ghost commented 1 year ago

I would like for someone to revisit this bug. The flatpak org.gtk.Gtk3theme.Breeze package works perfectly fine for Firefox flatpak, for both light and dark mode. Brave browser flatpak seems to not work this way. I have even set flatpak override com.brave.Browser --env GTK_THEME=Breeze, and it still will not use the dark mode. Are there any work arounds for this, or will the bug be addressed?

Does this work on normal version (meaning non flatpak) with KDE, because the only common thing between people having this bug is KDE.

Also it's been a long time since i used kde but do you have installed both :

org.gtk.Gtk3theme.Breeze and org.gtk.Gtk3theme.Breeze-Dark Flatpak ?

mrust1219 commented 1 year ago

The breeze-dark flatpak has been deprecated. You can no longer download it. Just to clarify I am not using system titlebars with it. I am using the browsers titlebars.

mrust1219 commented 1 year ago

Info: runtime org.gtk.Gtk3theme.Breeze-Dark branch 3.22 is end-of-life, with reason: This theme has been replaced by org.gtk.Gtk3theme.Breeze, see README for workaround on using system color schemes. https://github.com/flathub/org.gtk.Gtk3theme.Breeze#workarounds

I was able to somewhat workaround it by setting

flatpak override --user --filesystem=xdg-config/gtk-3.0:ro

As you can see, the theme is applied, but doesn't look quite right. Better than having it be light mode though.

Screenshot_20230301_190739

mrust1219 commented 1 year ago

Here's a better screen shot

Screenshot_20230301_191513

rany2 commented 1 year ago

I'm guessing if this is occurring on other Flatpaks, then it's not a Brave issue?

ghost commented 1 year ago

I'm guessing if this is occurring on other Flatpaks, then it's not a Brave issue?

i don't think it's a brave issue since i had the very same problem on all flatpak with the skin ADW-gtk3 (who generate a GTK4 libadwaita skin for gtk3 app) and was only fixed by the installation of : org.gtk.Gtk3theme.adw-gtk3-dark AND org.gtk.Gtk3theme.adw-gtk3

And since the bug seem to occur only on KDE desktop i do think it's a theming issue in the KDE stack support of Flatpak.

rany2 commented 1 year ago

Thanks for the confirmation. I don't think I could do anything then.

mrust1219 commented 1 year ago

Personally, I have not had it occur with other flatpaks. All chromium based browser flatpaks usually require a bit of tinkering to get the theme working in my experience. Brave flatpak is the only one I have had this issue with though. I found it easier to theme in Gnome than KDE. The adw-gtk3 actually has a flatpak theme, and that does work with Brave. You have to override it specifically for Brave.