GtkHButtonBox and the styles from the gtkrc.
- From: Tom Gaudasinski <cetus internode on net>
- To: gtk-app-devel-list gnome org
- Subject: GtkHButtonBox and the styles from the gtkrc.
- Date: Fri, 05 Jan 2007 17:14:55 +0000
Greetings,
I am creating an application, in the midst of which I've discovered
a certain quirk in GTK+ which I'm hoping can be disproved. I want to set
the spacing in between buttons of a GtkHButtonBox to a certain number,
let's say 10 pixels for example's sake. My ~/.gtkrc-2.0 file looks like
this:
style "foo" {
GtkHButtonBox::padding = 10
GtkHButtonBox::spacing = 10
}
class "GtkHButtonBox" style "foo"
I believe that this is adequate to achieve what is required. It does not
however do anything. I have spent quite a lot of time instigating why
this is. I know that what I have in my gtkrc file is referencing the
correct widget because other properties like "min-child-width" do affect
the HButtonBox. This led me to do a little digging around the GTK+
source code to find this:
GtkWidget* gtk_hbox_new (gboolean homogeneous, gint spacing) {
GtkHBox *hbox;
hbox = g_object_new (GTK_TYPE_HBOX, NULL);
GTK_BOX (hbox)->spacing = spacing;
GTK_BOX (hbox)->homogeneous = homogeneous ? TRUE : FALSE;
return GTK_WIDGET (hbox);
}
Which is the ONLY way I know of constructing a new HBox. HButtonBox
allows you to construct a new HButtonBox without any arguments to the
function gtk_hbutton_box_new(). This leads me to believe that the
HButtonBox construction function gives default values to the HBox
construction function (although I haven't found this). Now, my
assumption is that because the only way to make a HBox is by specifying
the homogenous and spacing properties, that this overrides those that
were given in the gtkrc file. Is this correct? And if so, is there any
way I can get HButtonBoxes created by GTK+ to use the values from my gtkrc?
Thank you.
P.S.
I am no subscribed to this mailing list, so if you could please CC your
replies to me, that would be appreciated.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]