FedoraQt / QAdwaitaDecorations

Qt decoration plugin implementing Adwaita-like client-side decorations
GNU Lesser General Public License v2.1
72 stars 8 forks source link

white title bar in KeePassXC on Arch #28

Open k1gen opened 12 months ago

k1gen commented 12 months ago

with firejail: image

without firejail: image

grulja commented 12 months ago

It probably limits some DBus access, which we rely on for the xdg-desktop-portal. I don't think there is nothing I can do about that in QAdwaitaDecorations.

k1gen commented 11 months ago

keepassxc also has a white bar with dark theme, even without firejail. should I open a new issue?

grulja commented 11 months ago

You can reopen this one and change the title. What distribution do you use?

k1gen commented 11 months ago

I'm using Arch, installed qadwaitadecorations-qt5, qadwaitadecorations-qt6 and qt5-wayland-decorations. here's how the window looks: Screenshot from 2023-10-12 08-50-59

grulja commented 11 months ago

What is your version of gnome-session and xdg-desktop-portal?

k1gen commented 11 months ago

@grulja

$ pacman -Q | rg 'gnome-session|xdg-desktop-portal'
gnome-session 45.0-1
xdg-desktop-portal 1.18.0-2
xdg-desktop-portal-gnome 45.0-1
xdg-desktop-portal-gtk 1.14.1-3
grulja commented 11 months ago

Can you build QAdwaitaDecorations from git and run your app with QT_LOGGING_RULES='*.qadwaitadecorations=true'? This will report what color scheme it found. Is your GNOME session using dark or light theme?

k1gen commented 11 months ago

this actually only happens if the application was autostarted and put in tray, not if I close the autostarted one and launch it myself

grulja commented 11 months ago

Can you try with https://github.com/FedoraQt/QAdwaitaDecorations/pull/38?

k1gen commented 11 months ago

how can I try it if you didn't make a release with it?

grulja commented 11 months ago

how can I try it if you didn't make a release with it?

I was hoping you can build it from the sources as I don't want to make a release of something that is untested.

You just need to clone this repo, checkout to dbus-watcher branch and follow the instructions mentioned in the README.

k1gen commented 11 months ago

@grulja I compiled the dbus-watcher branch and installed it, nothing changed. here's what I did:

git clone git@github.com:FedoraQt/QAdwaitaDecorations.git && cd ...
git checkout dbus-watcher
mkdir build && cd build
cmake -DCMAKE_INSTALL_PREFIX=/usr -DHAS_QT6_SUPPORT=true -DUSE_QT6=false ..
make && sudo make install

I have also exported QT_LOGGING_RULES=*.qadwaitadecorations=true in ~/.config/environment.d/envvars.conf, here are all the logs:

Oct 19 14:38:59 think keepassxc[2084]: qt.qpa.qadwaitadecorations: Using Qt5 version with Qt6 backports
Oct 19 14:38:59 think keepassxc[2084]: qt.qpa.qadwaitadecorations: XDP DBus service is running, querying settings
Oct 19 14:38:59 think keepassxc[2084]: qt.qpa.qadwaitadecorations: Changing color scheme to  light
Oct 19 14:39:00 think keepassxc[2084]: qt.qpa.qadwaitadecorations: Using  "window-close-symbolic.svg"  from  ""  theme
Oct 19 14:39:00 think keepassxc[2084]: qt.qpa.qadwaitadecorations: Using  "window-minimize-symbolic.svg"  from  ""  theme
Oct 19 14:39:00 think keepassxc[2084]: qt.qpa.qadwaitadecorations: Using  "window-maximize-symbolic.svg"  from  ""  theme
Oct 19 14:39:00 think keepassxc[2084]: qt.qpa.qadwaitadecorations: Using  "window-restore-symbolic.svg"  from  ""  theme
grulja commented 11 months ago

I'm surprised you were able to build it with -DHAS_QT6_SUPPORT=true. Does Arch have same backports we have in Fedora to qtwayland? Anyway, there seem to be something wrong with your xdg-desktop-portal instance as in your case you don't seem to be able to read the settings. Maybe some of the portal implementation is getting delayed or something? But the issue doesn't seem to be in QAdwaitaDecorations.

k1gen commented 11 months ago

I built it because I have decorations backport: https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=qt5-wayland-decorations the portal wasn't altered in any way, and services start without delays, so I have no clue what to do now: systemctl --user status --no-pager xdg-desktop-portal xdg-desktop-portal-gtk xdg-desktop-portal-gnome | curl -F'file=@-' https://0x0.st: https://0x0.st/HJQQ.txt

k1gen commented 11 months ago

another app in autostart (JamesDSP) uses dark header bar, but keepassxc doesn't. what could be the culprit?

k1gen commented 11 months ago

it seems to be random: https://0x0.st/HJ3A.txt

ArtyIF commented 11 months ago

For me, it consistently triggers on KeePassXC's autostart. When launching it manually, it's always dark. The autostart also always ignores the minimize/maximize preferences in GNOME Tweaks, while the manually launched program doesn't.