Re: setting the style of a menubar menu item ?
- From: Owen Taylor <otaylor redhat com>
- To: Paul Barton-Davis <pbd Op Net>
- Cc: gtk-list redhat com
- Subject: Re: setting the style of a menubar menu item ?
- Date: 07 Dec 1999 16:03:55 -0500
Paul Barton-Davis <pbd@Op.Net> writes:
> I have the following widget arrangement:
>
> +-HBox----------------------------------------------+
> |+---------------------+ +---------------------+|
> || | | ||
> || button | | menubar w/1 item ||
> |+---------------------+ +---------------------+|
> +---------------------------------------------------+
>
> i want to set the font used by the menubar item to the same as the one
> used by the button. normally, i use gtk_widget_set_name() to do this,
> and then define the style in an rc file. in this case, both the button
> and the widget will use the same style.
>
> however, i can't figure out which widget i should be setting the name
> of. i tried both the widget returned by gtk_item_factory_create_item()
> and the one returned by gtk_item_factory_get_menubar_widget(), but
> neither seems to result in the font changing. in both cases, the text
> of the menubar item is in the font of the default style.
Remember, a menu item is a label contained in a GtkMenuItem widget
which is a container.
So, if you set the name of the menu item to "MyItem", then the pattern
specification in your RC file should look like:
widget "MyItem.GtkLabel" style "MyFontStyle"
Regards,
Owen
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]