Xfce Forum

Sub domains
 

You are not logged in.

#1 2009-08-31 15:39:38

marius_c
Member
Registered: 2009-08-26
Posts: 6

masking color 4 panel to have transparent bakground

Hi,
I am trying to make a transparent panel, but not having the whole window surface (with tweak alpha level).
I would like to define a certain color as mask color and that color to be transparent.
All other colors and text should stay opaque 100% or as alpha level set from tweaker.

Thank you.

Offline

#2 2009-08-31 19:54:21

crimesaucer
Member
Registered: 2007-05-21
Posts: 103

Re: masking color 4 panel to have transparent bakground

marius_c wrote:

Hi,
I am trying to make a transparent panel, but not having the whole window surface (with tweak alpha level).
I would like to define a certain color as mask color and that color to be transparent.
All other colors and text should stay opaque 100% or as alpha level set from tweaker.

Thank you.

You can use Wapush's cairo-patch to make your xfce4-panel transparent: http://forum.xfce.org/index.php?topic=3 … 5#msg17785

download it: http://www.cooptel.qc.ca/~pggervais/xfc … tch.tar.gz



To change the color you must edit the patch before you build the xfce4-panel. There are a couple of lines in the patch that look like this:

+        cairo_set_source_rgba (cr, r, g, b, ALPHA);

Change them to something like this (this is for the color black):

+        cairo_set_source_rgba (cr, 0, 0, 0, ALPHA);

And there are a few more lines that need to be changed like this one:

+        cairo_set_source_rgba (cr, r, g, b, 1.0 - ((1.0 - ALPHA) / 3));

to this:

+        cairo_set_source_rgba (cr, 0, 0, 0, 1.0 - ((1.0 - ALPHA) / 3));

These are the RGBA colors that you can use here: http://www.december.com/html/spec/colorrgbadec.html


----------------------------------------------------------------------------

For different levels of transparency edit the lines that define ALPHA:

+#define ALPHA            0.2

to something like this (I used this for dark black):

+#define ALPHA            0.7

-------------------------------------------------------------------------------

then your panel can look like this:

Screenshot-72.png

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.010 seconds, 7 queries executed - Memory usage: 521.22 KiB (Peak: 523.98 KiB) ]