[prev in list] [next in list] [prev in thread] [next in thread]
List: gtk-app-devel
Subject: Gtk button strangeness
From: Brian Tietz <sdbtietz () yahoo ! com>
Date: 2009-07-27 0:20:05
Message-ID: 12573.93582.qm () web52705 ! mail ! re2 ! yahoo ! com
[Download RAW message or body]
I'm having trouble with GtkButtons. They should (and usually do) size themselves to \
be 27 pixels high with my currently selected GNOME theme. All of them are created \
using gtk_button_new_with_label. The problem is that one particular button sizes \
itself to 42 pixels high instead of 27.
I assume that the embedded text box is trying to wrap to two lines. I don't want \
that. I tried the obvious, and it didn't work:
GtkWidget* label_widget = gtk_bin_get_child (GTK_BIN (gtk_button));
assert (label_widget);
GtkLabel* gtk_label = GTK_LABEL (label_widget);
assert (gtk_label);
gtk_label_set_line_wrap (gtk_label, FALSE);
The other bizarre thing is that it seems to have something to do with the init \
sequencing when showing the window. If I create buttons with the same labels in a \
minimal test application (a modified version of the GTK table packing tutorial) all \
three buttons are sized to be 27 pixels high, even the one which in my real \
application context is sizing itself to 42.
Does anyone have any advice for how to resolve or even begin to debug this?
I also have a only second question related to this problem. I'd previously asked for \
some information on themes, and got a partial answer:
> > The "Understanding Metacity Themes" GNOME library documentation doesn't
> > cover this aspect <snip - irrelevant>
>
> Not surprising,since metacity themes and gtk themes are unrelated.
Where are Gtk themes documented? I'm referring to the user preferences that affect \
such things as button sizing, and how Gtk widgets actually retrieve and act on those \
preferences. Looking around http://library.gnome.org/devel/gtk/stable the only \
instance of the word "Theme" has to do with icon themes. Nothing at all (at least \
that I can find) pertaining to how widget sizing is affected by GNOME Appearance \
Preferences selection.
Thanks,
Brian
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic