Re: How to make my own widget semi-transparent?
- From: John Stebbins <stebbins jetheaddev com>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: How to make my own widget semi-transparent?
- Date: Mon, 13 Apr 2009 16:58:17 -0700
The documentation for GdkWindow has a good example of how to do
translucent widgets.
http://library.gnome.org/devel/gdk/unstable/gdk-Windows.html#composited-window-example
Your attachments didn't go through, so I can't say what your doing
wrong. But if I had to guess, I would say you're probably not correctly
setting up the expose event. Also, I wrote a custom widget to
generalize multiple overlapping translucent layers. You might want to
have a look at it. http://www.stebbins.biz/home/node/5
On 04/08/2009 09:25 PM, Zhe Su wrote:
Hi,
I'm writing a program which uses cairo to paint some customized
semi-transparent widgets.These widgets might overlap with each other.
However I didn't find a way to make the widgets truely semi-transparent. If
a widget is covered by another widget, then the covered area will always be
erased by the upper widget.
A test program and its screenshot is attached. The program draws a window
with two fixed widgets, both are painted with cairo. One is semi-transparent
green another is blue. No matter if composite extension is enabled or not,
the result is not what I expect.
Anyone know how to implement real semi-transparent widgets with current
gtk?
Regards
James Su
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]