Open ImUrX opened 1 year ago
How are you opening these apps? provide a repro please
I tried opening an <input type="file">
, those are the ones that don't respect the color scheme.
Could you give me more info about your system? OS, Desktop Environment or Window manager, and webkit2gtk version.
OS: EndeavourOS Linux x86_64
DE: GNOME 43.3
WebkitGTK2: 2.38.5-1
After hours of testing on Gnome, epiphany is always whether dark mode is enabled or not, and so is wry apps too. I think the only thing that made difference is setting the gtk theme in the gtk configuration files or through GTK_THEME
env var.
I will close this for now since the behavior matches the rest of the OS.
I have the dark theme on through GNOME, this is not correct behavior still.
It didn't matter to me whether dark mode was enabled or not, the only thing that made a difference was gtk-application-prefer-dark-theme = true
in gtk settings configuration file
OK, if i disable dark mode through the settings panel, this is reflected in Firefox for example but not in any tauri app, thats what I'm trying to say.
What about epiphany? what is the content of ~/.config/gtk-3.0/settings.ini
?
I have the same problem: I create a media query:
dark_query = window.matchMedia('(prefers-color-scheme: dark)');
and set a listener:
dark_query.addEventListener('change', (e) => { ... e.matches ... })
This works on Firefox and in the gtkwebkit-based Epiphany browser. It does not work in gtkwebkit-based Wry (or Electron or Qt or the chrome browser). By "works" I mean the event fires when I change Style in Gnome Settings -> Appearance, and the appearance changes. This is on Fedora 38.
I, too, faced this problem today (first time trying Tauri). Indeed, the content of ~/.config/gtk-3.0/settings.ini
defines whether the default tauri app start with light or dark color scheme. I had this by default:
[Settings]
gtk-application-prefer-dark-theme=0
And then I changed 0
to 1
. I have (custom) dark theme and it doesn't detect it.
Is your feature request related to a problem? Please describe. File browsers opened from the app dont respect the current color scheme of the DE, meanwhile opening it from Epiphany does work.