Re: A proposal for units in GTK+



Matthias Clasen <maclas gmx de> writes:

> >   box = gtk_vbox_new (FALSE, GTK_UNIT_EM (2));
> >   gtk_container_set_border_width (container, GTK_UNIT_CM (5));
> 
> Hopefully, these macros will also allow things like GTK_UNIT_EM(0.5).

Yeah.  I was thinking of storing it internally in hundredths of em's or
something.  My book claims that machines traditionally divided the EM
into eighteen, thirty-six, or fifty-four subparts.  I didn't seem to do
a good job explaining this.

Additionally, I don't know if we want to distinguish between height and
width of a font, as an 'em' is technically only a horizontal unit of
measure.  Adding two font-based units seems to be possibly too
confusing, though.

Thanks,
-Jonathan




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