Re: XSetting for font

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
>>>  gtk-font-name.
>>> Am I missing something ?
>>The way it would basically work is that in gtkrc.c:gtk_rc_style_to_style ()
>>After calling:
>>  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
>proposed above.
>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.
>Please explain.
>	Erwann

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]