danth / stylix

System-wide colorscheming and typography for NixOS
https://stylix.danth.me/
MIT License
1.22k stars 159 forks source link

FlatPak PrusaSlicer doesn't get styled #465

Open dzervas opened 4 months ago

dzervas commented 4 months ago

I'm not sure if this is a problem with flatpak or PrusaSlicer specifically but it doesn't get styled:

image

(My theme is snazzy, a dark one)

I'm using sway with GTK enabled (Qt theming is broken)

danth commented 4 months ago

Is this a GTK application? If not, we will need to write a specific module to theme it. If it is, it may be overriding the system theme with its own theme. Also, as far as I know, Flatpak isolates apps from the rest of the system, which may prevent it from accessing config provided by Stylix.

dzervas commented 4 months ago

PrusaSlicer uses GTK but my question was more towards flatpak in general - is there the ability to "export" the gtk and qt themes to flatpak?

danth commented 3 months ago

I'm not familiar with the details of Flatpak, but if you can somehow make ~/.config/gtk-3.0 and ~/.config/gtk-4.0 visible to the app then it should pick up the theme.

sonjiku commented 2 weeks ago

I'm not familiar with the details of Flatpak, but if you can somehow make ~/.config/gtk-3.0 and ~/.config/gtk-4.0 visible to the app then it should pick up the theme.

I don't think it's possible for these files to be read by most flatpak apps. Could there possibly be a way to create a new theme instead of creating an "override" (if that's the correct term) through these files?

sonjiku commented 2 weeks ago

Perhaps patching the theme with an overlay for the adw-gtk3 package that replaces the relevant strings in the theme's gtk.css? I think it might be ugly codewise, depending on how it is implemented, but I believe it will be a better solution.

Btw, through this solution, the "issue" about not being able to switch "polarity" without rebuilding could be "fixed".