Open bevsxyz opened 1 year ago
See, mine comes up in dark mode.
This seems to come down to how support has been implemented for so-called "dark mode". There are both "dark themes" that can be selected, and also dark variations of certain themes (most notably, the default Adwaita) that can be enabled... but then those won't work if you switch to a theme which doesn't offer a dark variation, or which offers it as a separate theme choice.
On my system, Adwaita is selected as the system theme (it's the value set — well, left defaulted — in org.gnome.desktop.interface.gtk-theme
), and its dark variation is selected by org.gnome.desktop.inteface.color-scheme
being set to prefer-dark
(which I think is what the Control Center switch now controls, that color-scheme
value.)
If your Gtk or Gtk4 apps have a different theme enabled, or aren't configured for "dark mode", they might not respect those values. I know that there's a trigger in the inspector for both Gtk and Gtk4, and that they separately do something... but I don't know WHERE the setting that switch controls even lives.
Try this, though:
If, as I suspect, it's not enabled, that should fix it and turn your GSConnect settings window Dark. Whether it will be permanent, or how/if you can make it permanent... ¯\_(ツ)_/¯
@ferdnyc The keyboard shortcut is unresponsive in my case.
@bevsxyz Hm, that's strange! It wouldn't surprise me with a Gtk3 app, since it requires a settings change to enable, but for Gtk4 I was under the impression that the inspector keybindings defaulted to enabled. Perhaps that's not true with Silverblue, for some reason.
(The GSettings key is org.gtk.gtk4.Settings.Debug.enable-inspector-keybinding
, if you want to check it.)
$ gsettings get org.gnome.desktop.interface gtk-theme
'Adwaita'
$ gsettings get org.gnome.desktop.interface color-scheme
'prefer-dark'
$ gsettings get org.gtk.gtk4.Settings.Debug enable-inspector-keybinding
true
@ferdnyc These are the values of the keys you had mentioned. Did I check the right place?
@bevsxyz Yup, looks like it!
I don't know why the inspector wouldn't come up for you, that's strange. I wonder if there's a package that needs to be installed?
...Though, come to think of it, it is possible to launch the preferences manually, so you don't really need the keybinding. This should work just as well:
GTK_DEBUG=interactive \
~/.local/share/gnome-shell/extensions/gsconnect@andyholmes.github.io/gsconnect-preferences
(Make sure it's not already open, before you do that.)
That should bring up the preferences window, with the debugger behind it (annoyingly). Or if it doesn't, then there's definitely some dependency it requires that you must be missing.
On my Fedora 37 (Workstation) system, even with gnome-control-center configured for dark mode, if I go in with the inspector and turn off Dark Variant
, it will turn the Preferences window (only) to light mode, so clearly there's some sort of control other than what's in org.gnome.destkop.interface
(though, as I said, I have no idea where...)
(Edit: If you are missing a package, it's most likely just gtk4-devel
.)
with the debugger behind it (annoyingly).
Huh, actually not always. They seem to race a bit. ...That's even more annoying!
The other thing you'd be looking for, in the inspector, is in the Resources view. On my system, the interface has both light and dark CSS files available to it as resources. (Those are automatic, they come from Gtk4.)
@ferdnyc Flipping the Dark Variant
switch under Visual
did the job. Both the dark and light CSS files are available for Adwaita too.
However, the change is temporary and only for the settings window. I think we both have the opposite issue. For you dark mode is default and changing to light mode is an issue.
Reopening the window, it switches back to light mode.
@bevsxyz Yup, that's pretty much exactly what I expected.
In a way, this is good news! It means that everything is working... well, I'm not going to say "normally", but "in the manner we've come to expect". You haven't uncovered any Additional Weirdness, so the only thing you have to face is the Usual Weirdness. Could be worse!
Now we just need to figure out what bit in what location the "Dark Variant" inspector switch controls, why it would be different from the color-scheme preference selected in gnome-control-center
, and how it can be flipped to default in the other direction (or, even better, to just follow the g-c-c
setting).
I'd take that (those) question(s) to https://discourse.gnome.org/; you have a focused, specific scenario now, with concrete data points about what's going on... hopefully someone there will be able to point to whatever obscure value or config file governs this, and explain how to sort it out.
That'd be my next step, anyway.
@ferdnyc I have created a new topic there.
So, I installed Fedora 38 myself (in a VM), hit this same issue, and tracked down what was going on.
The core issue is that GSConnect is using Gtk 3.0 (explicitly:)
...and the GNOME 44 dark-mode settings don't affect Gtk3.0. (As I expected, all Gtk3 apps are affected — yelp
, the help browser, is another easy pick to confirm that this doesn't only happen with GSConnect.)
A quick & dirty fix is to install gnome-tweaks
, along with the gnome-themes-extra
package. Then, in Tweaks' Appearance tab, set the "Legacy Applications" theme to "Adwaita-dark". That will dark-mode-style all Gtk3.0 apps.
But we should probably also stop forcing Gtk3, at least in brand-new GNOME releases.
But we should probably also stop forcing Gtk3, at least in brand-new GNOME releases.
Turns out, there's quite a bit of work involved in moving to Gtk4, because the code uses a lot of interfaces from Gtk3 that were removed in Gtk4. (Mostly virtual functions for signal handling, things like vfunc_delete()
, vfunc_key_press_event()
, etc... that Gtk4 doesn't give us access to anymore.)
...Though, come to think of it, it is possible to launch the preferences manually, so you don't really need the keybinding. This should work just as well:
GTK_DEBUG=interactive \ ~/.local/share/gnome-shell/extensions/gsconnect@andyholmes.github.io/gsconnect-preferences
I get the following error on Fedora 38:
-bash: /home/user/.local/share/gnome-shell/extensions/gsconnect@andyholmes.github.io/gsconnect-preferences: No such file or directory
EDIT
A quick & dirty fix is to install
gnome-tweaks
, and then in its Appearance tab, set the "Legacy Applications" theme to "Adwaita-dark". That will dark-mode-style all Gtk3.0 apps.
...resolved the issue.
I get the following error on Fedora 38:
-bash: /home/user/.local/share/gnome-shell/extensions/gsconnect@andyholmes.github.io/gsconnect-preferences: No such file or directory
You may have the extension installed systemwide, in which case the equivalent command would be:
GTK_DEBUG=interactive \
/usr/share/gnome-shell/extensions/gsconnect@andyholmes.github.io/gsconnect-preferences
...But there's no real need, as setting the legacy theme via gnome-tweaks
is the only permanent fix, anyway.
I have resolved the issue with the gnome extension legacy-gtk3-theme-scheme-auto-switcher. It is a permanent fix.
gnome-tweaks
is not packaged as a flatpak. Since I use Fedora Silverblue, I did not want to overlay it with ostree either.
Okay, so still the same issue with Fedora 40 / GNOME 46. And GSConnect 57.
So what is the TL;DR here?
In GNOME Tweaks, I only have "Adwaita" selectable in the list (for "legacy applications"), but not anything like "dark" (just high contrast themes):
Aka also Fedora Silverblue here, though I doubt that is relevant.
$ rpm-ostree status -b
State: idle
AutomaticUpdates: stage; rpm-ostreed-automatic.timer: last run 1 day 2h ago
BootedDeployment:
● fedora:fedora/40/x86_64/silverblue
Version: 40.20240514.0 (2024-05-14T00:39:14Z)
BaseCommit: 63be678888a00a9fe13f49c2ecb38545513f4d2d4ede292437ed23094d0aab23
GPGSignature: Valid signature by 115DF9AEF857853EE8445D0A0727707EA15B79CC
Edit: I've also, as other's apparently did before, asked in the GNOME forum.
$ gsettings get org.gnome.desktop.interface gtk-theme
'Adwaita-dark'
$ gsettings get org.gnome.desktop.interface color-scheme
'prefer-dark'
$ gsettings get org.gtk.gtk4.Settings.Debug enable-inspector-keybinding
true
Yeah, it looks like they removed the Gtk3 settings from tweaks. I think the extension @bevsxyz recommended is probably the best option.
Yeah, it looks like they removed the Gtk3 settings from tweaks.
Actually, I was confused. (Well, more accurately, I'd completely forgotten what my original workaround was.) The option to set a legacy theme is still there.
However, turns out the Adwaita-dark theme is provided by the gnome-themes-extra
package, which isn't installed by default. If it's not installed, you won't see many theme options.
The fix is to just install gnome-themes-extra
, then you'll have Adwaita-dark as a theme option for legacy Gtk.
Describe the bug
The GSConnect Mobile settings page does not follow the system dark theme. Additionally, there is no way to change the theme manually in the settings.
Steps to reproduce
Expected behavior
The settings window will follow the system theme. Having the option to change the theme in settings would be a plus.
GSConnect version
54
Installed from
Extension Manager
GNOME Shell version
43.3
Linux distribution/release
Fedora Linux 37.20230319.0 (Silverblue)
Paired device(s)
Realme X2
KDE Connect app version
1.22.2
Plugin(s)
No response
Support log
Screenshots
Notes
I am uncertain if this is a Silverblue thing or a Gnome 43 issue.