Re: backgroud colour - HELP



On Tue, 14 Jan 2003, Steve & Patti Getzinger wrote:

Stéphane Konstantaropoulos wrote:
Hello people,

I am developping Lumiere, video player for gnome 2.

It is in gtk 2.

I have a problem with the colour of the background, what happens is:

     The player is a GtkBin containing a GtkSocket.
     The GtkSocket, I resize to keep the aspect ratio, so it does not hold
all the space allowed by the window in which it is.

     THe window is a bonobo window and it embeds the player via a
bonoboPlug.

I found that the GtkBin shrinks according to the size of the GtkSocket,
so changing the color of the gtkbin is useless.

What is the problem then? The area around the GtkBin and it's container,
the bonobo window. So I tried to change the window background, it does
it but then when I load the player widget in it, it goes back to the
default background colour...

How can I do this? Is there a way of setting some kind of "default
background" or some thing like that??

Thanks for your help


Here is what I use. Thanks Eric Harlow :)

void SetStyle (GtkWidget *widget, gpointer data)
        {
                GtkStyle *style;

                style = (GtkStyle *) data;

                gtk_widget_set_style(widget,style);

                if(GTK_IS_CONTAINER(widget))
                {
                gtk_container_foreach(GTK_CONTAINER(widget),SetStyle,style);
                }
        }

Hope that helps,
Steve

Well it would if you advised which container to use as the top one...
The GtkBin I repeat is displayed as a GtkPlug, so setting its container
has no effect. I tried setting the GtkBin, it just worked but only for
the area of its child, around it it remains the default style...

More ideas??

-- 
   _ _ _
  / \ \ \
 / / \ \ \          (el greco)
 \/_ | S  \   Muy Mano,
  | \/    /         Muy Presa.
   \_  K /  http://users.aber.ac.uk/ssk01
      \  \




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]