Re: Widgets inside a GtkDrawingArea



On 3/21/06, Sander Marechal <s marechal jejik com> wrote:
The button is sitting neatly on top of the playing area now, but it has
a small grey box around it. See the screenshot at [1]. I think that the
1 pixel grey border is added by an invisible container widget that holds
the button in question somehow. I have set all the border values on the
button to 0 already, so I think it's not the button itself.

Is it possible to remove that container, or set it's grey background to
transparent so that the rounded button shape is drawn directly on the
green canvas? A GIMPed mockup of the desired result is at [2].

It's no problem if it can't be done in Glade directly. I can simply load
the glade XML file in C and execute a couple additional GTK commands on
the button or it's container.

There's no special container responsible for that, this is the way
your current theme (Clearlooks, right?) draws button's internals. The
partial solution is to use a little hack to avoid default theme, like
this:

-- C
GtkStyle *style;
GtkWidget *button;

button = gtk_button_new_with_label ("the bad bad button");
style = gtk_style_copy (button->style);
gtk_widget_set_style (button, style);
g_object_unref (style);
C --

   Olexiy


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