Re: GtkCellRendererText weight property bug...



On Sun, 30 Sep 2001, Mikael Hermansson wrote:

> Very small patch but to make sure is this ok to commit? :-)
> 
> Greets
> 
> MH.
>
> Index: gtk+/ChangeLog
> ===================================================================
> RCS file: /cvs/gnome/gtk+/ChangeLog,v
> retrieving revision 1.2342
> diff -r1.2342 ChangeLog
> 0a1,5
> > Sun Sep 30  05:31:32 2001 CEST Mikael Hermansson <tyan linux se>
> > 
> >     * gtk/gtkcellrenderertext.c changed "weight" property type from 
> >       g_param_spec_int to g_param_spec_enum.

People do seem to get this wrong a lot. Weight is actually an integer. The 
enum just specifies some usefull values:

typedef enum {
  PANGO_WEIGHT_ULTRALIGHT = 200,
  PANGO_WEIGHT_LIGHT = 300,
  PANGO_WEIGHT_NORMAL = 400,
  PANGO_WEIGHT_BOLD = 700,
  PANGO_WEIGHT_ULTRABOLD = 800,
  PANGO_WEIGHT_HEAVY = 900
} PangoWeight;

You can pass any value you want.

This is based on CSS i think.

/ Alex






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