Closed hmaarrfk closed 1 year ago
The file dialog is either opened using Gtk or using xdg-desktop-portal. In both cases it should be Gtk (xdg-desktop-portal-gtk) who is responsible for theming, we just modify Qt stuff. Do other Gtk apps open in dark style?
Thank you for your reply. It seems that the likely cause is a misconfiguration of conda.
Gtk or using xdg-desktop-portal
Can you point me to where I can add a print statement to confirm the code path?
Do other Gtk apps open in dark style?
If I uninstall your plugin, and install the gtk-platformtheme from Qt, that file dialog opens with the correct theme.
Thanks again for the input and the help.
A little more information on "do other gtk application get themed correctly":
I created a demo application following: https://python-gtk-3-tutorial.readthedocs.io/en/latest/dialogs.html
I think I finally found that the code here that gets run is from:
(openPortal function call)
I used the example that somebody else on github created to open the file dialog through dbus + xdg desktop portal https://github.com/flatpak/xdg-desktop-portal/issues/820#issue-1282727445
It seems to create the same "unthemed" window.
It seems that it has to do with the conda + xdg desktop portal + ubuntu integration.
I tested running things from the the ubuntu shipped python, and it seems that it is also unthemed. Maybe it is an issue with ubuntu's XDG desktop portal.
It may just be that I'm hitting: https://bugs.launchpad.net/ubuntu/+source/xdg-desktop-portal-gnome/+bug/1967777
Ok i don't think there is anything to do with your code.
I've patched out XDG usage for now (thanks for making that easy) and I think this makes things "better" for my usecase.
I'll keep an eye periodicially and likely open an issue with ubuntu once I get back on an LTS.
FYI, my patch is https://github.com/conda-forge/qgnomeplatform-feedstock/pull/7/files#diff-a014225d62fbfa18a53c3f8e70e9a9eae5aee55b4bd9411402668c2797380b55
I'm glad you managed to find a workaround. I'm closing this bug now as it's not related to QGnomePlatform.
Thank you for making this available. It is the only way to get things to look decently well for Qt Application on wayland that I've found.
I'm working to package this on conda(-forge).
conda allows users to install software in a directory of their choice.
I've hit the usual conda bug where things that don't live in the system directories break: https://github.com/conda-forge/qt-main-feedstock/issues/177 https://github.com/conda-forge/qgnomeplatform-feedstock/pull/5
I'm able to get the "qt application" to take on the "dark / light" themes from the gnome plugin you created, however once I open a file dialog, they always seem to be opened with the Adwaita light theme.
Is this a known bug here? or is the bug likely in the conda integration.
Thank you for your input.
I'm using version 0.9.1, ubuntu 23.04