Re: XSetting for font
- From: Erwann Chenede <Erwann Chenede Sun COM>
- To: otaylor redhat com
- Cc: gtk-devel-list gnome org
- Subject: Re: XSetting for font
- Date: Tue, 5 Mar 2002 12:06:26 +0000 (GMT)
I'll logged a bug to track this issue :
>>> >For 2.2 (multihead) we'll have to do something different - I think the
>>> >correct approach though is to add a ::font_desc GObject property,
>>> >and then set a default style->font_desc in a constructor() method
>>> >if it hasn't already been set. (A bug about this would be useful
>>> >as well.)
>>> What difference would it make from the actual code as the constructor()
>>> as no way of figuring out what screen it is on ?
>>> The ::font_desc GObject on GtkSetting just would be a duplicate of
>>> Am I missing something ?
>>The way it would basically work is that in gtkrc.c:gtk_rc_style_to_style ()
>> style = GTK_RC_STYLE_GET_CLASS (rc_style)->create_style (rc_style);
>>We'd set the default font. Unfortunately, since it's virtualized in this
>>way, we'll probably have to pay the price of creating a font description,
>>destroying it, and replacing it with the real font description.
>I still don't get your idea ;(
>GtkRcStyle are screen independent so we can't get a GtkSettings from
>it therefore we can't really set screen dependent settings in this fct as you
>Why not instead update the rc_style->font_desc in
>gtkrc.c:gtk_rc_font_name_changed like this the font change will be
>automatically propagated when calling init_from_rc in gtk_rc_style_to_style.
] [Thread Prev