NickvisionApps / Cavalier

Visualize audio with CAVA
MIT License
155 stars 8 forks source link

Transparent window #141

Closed Strykar closed 7 months ago

Strykar commented 8 months ago

Could the window be made transparent? Show the desktop background image instead. And have no window decorations?

Currently its - https://i.imgur.com/xSqDNxk.png

nlogozzo commented 8 months ago

I do not know if this is possible with GTK, but I will look into it :)

Strykar commented 8 months ago

Aw, back to Kitty it is. Thank you!

nlogozzo commented 8 months ago

I do not know if this is possible with GTK

https://docs.gtk.org/gtk4/method.Widget.set_opacity.html

Looks like we can! Will play around with it...

THEGOLDENPRO commented 7 months ago

setting the background colour to complete transparency works for me on KDE

image

fsobolev commented 7 months ago

hi @Strykar , sorry for late reply, I wasn't watching the repo for a while. The window of Cavalier is actually fully transparent (https://github.com/NickvisionApps/Cavalier/blob/main/NickvisionCavalier.GNOME/Resources/org.nickvision.cavalier.css#L2), it's just the default background color drawn by Cavalier is identical to the one from Adwaita theme, giving impression that the window itself is not transparent. But the background color can be changed in settings to any other, including fully transparent, and together with "borderless window" setting it's possible to make Cavalier only show foreground bars like on screenshot above. But on your screenshot I see the problem. Lack of rounded corners and very thick window borders indicate that there's no compositing available for the app (= no transparency). It means that either there's something wrong with your Cavalier installation, or there's something wrong with your graphics drivers, or you use Xorg window manager that has compositing disabled or doesn't provide it at all. In Xfce and KDE it's possible to enable/disable compositing in settings. If you use window manager that doesn't provide compositing (for example, openbox), take a look at picom or Xcompmgr.

Anyway, there's nothing to do on Cavalier side, so I'm closing the issue.

Strykar commented 7 months ago

Thanks for the update, I am using Gnome on Wayland with Nvidia's binary drivers. I assumed everything under the hood was was working as Kitty terminal can do transparency fine.

fsobolev commented 7 months ago

using Gnome on Wayland with Nvidia's binary drivers.

I once has the same issue in GNOME (not with Nvidia tho, Intel graphics) with some flatpak apps, caused by specific versions mismatch of Mesa libraries on the host and inside flatpak (as I understood, at least). But updating everything and reboot solved it, so that's not your case I guess. The only thing I can suggest is to run the app in a terminal (flatpak run org.nickvision.cavalier for flatpak or snap run cavalier for snap) and look if there are some error messages related to graphics that will maybe help you search for hints or possible solution. Hope you will find a fix :)