Re: colors and tool buttons/menu items
- From: Marisa DeMeglio <marisa dinf ne jp>
- To: Jan-Marek Glogowski <glogow fbihome de>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: colors and tool buttons/menu items
- Date: Thu, 05 Aug 2004 22:18:01 -0400
Thanks for the tip. The one thing I still can't do is set the
foreground (text) color on a tool button -
//mpCurrentWidget is a tool button widget pointer
//mFgColor is a GdkColor and is definitely valid
GtkWidget* labelwidget = gtk_bin_get_child(GTK_BIN(mpCurrentWidget));
gtk_widget_modify_fg (labelwidget, GTK_STATE_NORMAL, &mFgColor);
This works well on menu items but has no effect on tool buttons. Both
widget types that I am testing with were created from stock, and have
text and an image. I also tried just a plain tool button with only
text. Do you think there's something special I have to for tool buttons?
Thanks
Marisa
Jan-Marek Glogowski wrote:
Hi Marisa
MAybe you should set you own label widget via
gtk_tool_button_set_label_widget?
Be sure to use the real button an not a container widget, e.g. get the
real button via GTK_BIN(my_gtk_tool_button)->child.
gtk_tool_button_[get|set]_label_widget() provides a way to customize a
label widget - as long as you don't set one, it returns NULL and uses the
provided text.
I guess it's the same for GtkMenuItems
HTH
Jan-Marek
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]