Open bbb651 opened 11 months ago
A PR would be much appreciated!
I don't know how to fix this for the multi-monitor case, because I've noticed that the GTK settings are "reset" when I select the monitor to be fullscreened on, and I have to re-apply them. It's possible that the pause that you're experiencing is due to this GTK behaviour.
Giving ReGreet a try, and experiencing the same issue, also using a dark theme.
What happens exactly in my case is that first there's a pause going from the console view to the ReGreet UI, but that's acceptable to me. The worst part is that ReGreet UI is displayed first in light mode (background image already visible at this stage) and then there's a flickering with a 500 ms pause or so and it switches to dark mode, as set by the theme.
Is this worth reporting as a separate issue? Not clear if it's the same one.
Applications can override system-wide settings by setting the property of the GtkSettings object with g_object_set(). This should be restricted to special cases though; GtkSettings are not meant as an application configuration facility.
I have a feeling that the current approach is flawed to begin with. I am currently doing some development and noticed that regreet uses my user's gtk settings with like 0 config. And no flicker and it works fine. So... Maybe like... replace the config setting with a manual on how to configure a theme? Same in #72, just maybe link a tutorial to how to make gtk themes and not hack together weird solutions when clearly a system-level application theme is the way to go?
GTK settings are "reset" when I select the monitor to be fullscreened on
Could potentially be solved by a system level config too.
Forgot to link the source: https://docs.gtk.org/gtk4/class.Settings.html
Welp. At least on NixOS I can't actually implement a system-wide dark theme preference... That is sad. If anyone can figure this one out, I'd appreciate it. And that tutorial should go into the readme then.
Not to say it is impossible, I just give up for now.
/tableflip
I had to reboot...
What I am saying is that it is possible to use some kind of configuration facility that is system/user wide (I am not sure exactly what config optiions, I tried all the methods I found on the internet at once, will report back) but that system config doesnt have the flicker. And it just works.
Currently, there's a brief pause from when the UI is visible but frozen, to when the gtk settings loads and the application unfreezes. This is especially noticeable when using
application_prefer_dark_theme
(which IMO should default to true, it's not a good user experience to go from a dark console to a completely white screen, but I digress), because it flashes the screen with white then goes to dark, which is very jarring.I'm not familiar with Relm4 but I can try to make a PR (although without #30 it sounds very painful).