Custom Drawn Images in GtkImageMenuItem
- From: Pramod Patangay <pramod_iitg yahoo com>
- To: gtk-list gnome org
- Subject: Custom Drawn Images in GtkImageMenuItem
- Date: Mon, 3 Jan 2005 05:52:01 -0800 (PST)
Hi,
I am using GtkImageMenuItem in my code and the icon to
be displayed is custom drawn. To achieve this, I am
creating a GtkDrawingArea widget with proper size and
adding it to a GtkHBox. This GtkHBox will be the image
in the imagemenuitem. I am handling the expose event
(of the drawing area) callback where proper icon is
drawn in the drawing area. The problem that I am
facing is that, some of the portion of the icon is
transparent which means I SHOULD get proper background
color of the menuitem behind the icon wherever it is
transparent. For menus, select is called first and
then expose is called. Now the questions are
1) When expose event is called (after select event),
at that time, the item doesn't appear selected yet and
the background is still grey meaning not selected. Why
is it so?
2) How to get the exact background color (blue/green,
the selection color or grey the deselection color) of
the menu item when it is selected/deselected?
3) What event should I handle so that the correct
background of the menu item appears and I can render
the icon?
Is there any other way to achieve the same?
Thanks
-Pramod
__________________________________
Do you Yahoo!?
Dress up your holiday email, Hollywood style. Learn more.
http://celebrity.mail.yahoo.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]