Search code examples
linuxgtk3vala

Simple way to make a transparent window in Vala & Gtk3?


I want to make a gtk+-3.0 Vala window width 50% transparency (or more), but after 2 hour searching I just found over complexed examples or C examples which I couldn't convert to Vala. Do some of you know a simple example of a transparent gtk3 window in Vala?


Solution

  • You should not do this. Gtk+ is just not designed that way. You will have problems with different output backends. Your users will have problems with their user experience.

    If you really want to, you have to translate one of the code examples in C, Python, etc. that you can find on the internet.

    Here are two such examples:

    How to make Gtk+ window background transparent?

    http://www.kcjengr.com/programing/2017/11/02/transparent-gtk-window.html

    It shouldn't be too hard to translate those into Vala. If you encounter problems, ask new questions about the concrete problems.