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: Thu, 28 Feb 2002 19:32:38 +0000 (GMT)
Hi Owen,
>> >
>> >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.
Regards,
Erwann
[ I speak for myself, not for my employer. ]
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Erwann Chénedé, Sun Microsystems Ireland
Desktop Applications & Middleware Group
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]