FedoraQt / QAdwaitaDecorations

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

Build Fails - missing deps? #13

Closed LSeelig closed 10 months ago

LSeelig commented 10 months ago

Hello. I am not familiar with cmake, and I am struggling to build this on Fedora 38. I try to build, get a missing dependency error, hunt it down, and try again. This seems to be user error, but I don't know what else to do. Is there a reason this can't be precompiled, or could the instructions be improved assuming zero-knowledge?

grulja commented 10 months ago

I will do a F38 package as well, it's currently only in F39 and Rawhide. You will find it today in updates-testing.

LSeelig commented 10 months ago

Thank you. I installed it, and the GTK4 style applies, but the close button breaks, and the previous issues (corner radius) persist. I don't want to cause any extra work. I'll wait for qt theming to be sorted out in Fedora 39, but if this isn't expected behavior, feel free to reach out.

grulja commented 10 months ago

Thank you. I installed it, and the GTK4 style applies, but the close button breaks, and the previous issues (corner radius) persist. I don't want to cause any extra work. I'll wait for qt theming to be sorted out in Fedora 39, but if this isn't expected behavior, feel free to reach out.

Can you be more specific about all issues you have? Feel free to open bugs here with screenshots attached. I will try to fix them.

grulja commented 10 months ago

Did you apply the style using QT_WAYLAND_DECORATION=adwaita? Just making sure you are not still using QGnomePlatform decorations.

LSeelig commented 10 months ago

Yes. I got the decorations to display, but they were bugged out (the corner radius and close x button). If you're asking if I unisntalled QGnomePlatform, I did not. When I fully uninstalled it, the new decorations didn't show at all.

grulja commented 10 months ago

Yes. I got the decorations to display, but they were bugged out (the corner radius and close x button). If you're asking if I unisntalled QGnomePlatform, I did not. When I fully uninstalled it, the new decorations didn't show at all.

The new decorations will be used only with "QT_WAYLAND_DECORATION=adwaita", otherwise QGnomePlatform will enforce its own decorations.

LSeelig commented 9 months ago

With QT_WAYLAND_DECORATION=adwaita, I still got the bugged decorations. You can also see the corner clipping if you zoom in. This is done by the shell extension, but it is worth noting as the radius currently is GTK3, not libadwaita.

No decorations (QGnomePlatform uninstalled): image Old GTK3 Style (QGnomePlatform installed, QAdwaitaDecorations not installed) Screenshot from 2023-09-11 14-23-55 QAdwaitaDecorations (whether QT_WAYLAND_DECORATION=adwaita or is unset) Screenshot from 2023-09-11 14-34-34

Also note that this varies per-app and depending on format. Fedora media writer did not show the new decorations, only the QGnomePlatform GTK3 decorations, and KDE Clock would show the new decorations, GTK3 decorations, or default decorations depending on whether it was installed as an rpm, Fedora flatpak, or Flathub flatpak.

grulja commented 9 months ago

You probably didn't build QAdwaitaDecorations with Qt6, that's why Fedora Media Writer (Qt6) is still not using it in your case, but I can see it's still a bit buggy there (even with QGnomePlatform) not having mouse cursor hover effect. That's probably because it's a QML app.

I still don't understand what is the issue with the close button. With the new version I released yesterday (currently in updates-testing on Fedora 38) should use icons depending on your icon theme. What is your icon theme? Can you check it in gnome-tweaks?

I will look into the issues with corners.

LSeelig commented 9 months ago

Switching the icon theme to default fixed the close button. I am using morewaita. I want to find out how I can prevent this in the future, but that is not qadwaitadecoration's problem. As for building for Qt6, I installed both qadwaitadecorations-qt5-0.1.1-1.fc38.x86_64.rpm and qadwaitadecorations-qt6-0.1.1-1.fc38.x86_64.rpm from https://koji.fedoraproject.org/koji/buildinfo?buildID=2287683.

Even with the icon pack switched back, mediawriter still showed qgnomeplatform decorations.

As for the corners, I think it is my rounded corners extension (rounded-window-corners@yilozt) that causes the artifact. However, it is worth noting that the reason for this might be an incorrect radius. If I disable the extension, qadwaitadecorations only rounds the top corners, and I think it uses the same radius as qgnomeplatform/gtk3, not gtk4/libadwaita. Therefore, when I turn on the extension, it clips into the less rounded corners to conform to the gtk4 corners.

Lastly, it still is inconsistent. I think qadwaitadecorations works for some qt5 and qt6 applications (I tried kcalc and falkon), but other install methods are inconsistent. I can't easily recount it, but if an app has a flathub flatpak, rpm, and fedora flatpak, some might work and others might not. Some flatpaks even use xwayland, even when the rpm does not, or show neither qgnomeplatform or qadwaitadecorations.

grulja commented 9 months ago

Switching the icon theme to default fixed the close button. I am using morewaita. I want to find out how I can prevent this in the future, but that is not qadwaitadecoration's problem. As for building for Qt6, I installed both qadwaitadecorations-qt5-0.1.1-1.fc38.x86_64.rpm and qadwaitadecorations-qt6-0.1.1-1.fc38.x86_64.rpm from https://koji.fedoraproject.org/koji/buildinfo?buildID=2287683.

Even with the icon pack switched back, mediawriter still showed qgnomeplatform decorations.

Even when you run QT_WAYLAND_DECORATION=adwaita mediawriter?

Lastly, it still is inconsistent. I think qadwaitadecorations works for some qt5 and qt6 applications (I tried kcalc and falkon), but other install methods are inconsistent. I can't easily recount it, but if an app has a flathub flatpak, rpm, and fedora flatpak, some might work and others might not. Some flatpaks even use xwayland, even when the rpm does not, or show neither qgnomeplatform or qadwaitadecorations.

Flathub apps will not use QAdwaitaDecorations that comes from RPM packages. I need to add this to Flathub so you can use it. Also XWayland apps will use decorations provided by Gtk and not by Qt.

LSeelig commented 9 months ago

Media writer works now! I might have been using bash-profile wrong, and I fixed that, so the proper window decorations apply to media writer. The application itself doesn't seem to follow kvantum themes, but that has nothing to do with qadwaitadecorations. I think they hardcoded a gtk3 theme into the app, at least on gnome.

I know about xWayland. It's really clear when apps run with xwayland because they are blurred by unmitigated fractional scaling. GNOME currently does not allow xwayland apps to use a different resolution/scale when wayland experimental fractional scaling is enabled.