🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.interviews
Article #206

Re: probable iv-3.1beta bug in box alignment

#206
From: Mark Linton
Date: Mon, 10 Aug 1992 20:18
28 lines
2013 bytes
In article <9208032258.AA29461@horse.ee.lbl.gov>, mccanne@HORSE.EE.LBL.GOV (Steven McCanne) writes:
|> I wrote that I thought there was a bug with alignment in vboxes.  The problem
|> was that the following code fragment didn't seem to work right:
|> 
|> 	layout.hbox(layout.vglue(5 * 70),
|>                     layout.vbox(layout.vglue(),
|>                                 new Circle(100, kit.foreground(), 
|>                                            new Brush(1.0)),
|>                                 layout.vglue()));
|> 
|> After tracing through various execution paths and staring at the code for
|> a few more hours, I saw that if the alignment of the first vglue object
|> was set to 1.0, then things would work.  E.g., the following code "solves"
|> the problem outlined in my previous message:
|> 
|> 	layout.hbox(layout.vglue(5 * 70, fil, 0, 1.0),
|>                     layout.vbox(layout.vglue(),
|>                                 new Circle(100, kit.foreground(), 
|>                                            new Brush(1.0)),
|>                                 layout.vglue()));
|> 
|> Is my fix just a bug workaround, or is this really what you have to do to make
|> it work?  If the latter is true, I'm confused.

The current behavior is as intended.  An hbox will align its components
in the vertical dimension; thus the origin of the vglue is aligned to
the origin of the vbox.  A vbox is "top-aligned"; it has an alignment of 1.0.
Perhaps vglue should also be top-aligned by default.
Technical Details
Message-ID: <odimea0@fido.asd.sgi.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!olivea!sgigate!odin!fido!marktwain.rad.sgi.com!linton
References: <9208032258.AA29461@horse.ee.lbl.gov>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!olivea!sgigate!odin!fido!marktwain.rad.sgi.com!linton
From: linton@marktwain.rad.sgi.com (Mark Linton)
Newsgroups: comp.windows.interviews
Subject: Re: probable iv-3.1beta bug in box alignment
Message-ID: <odimea0@fido.asd.sgi.com>
Date: 10 Aug 92 20:18:36 GMT
References: <9208032258.AA29461@horse.ee.lbl.gov>
Sender: news@fido.asd.sgi.com (Usenet News Admin)
Reply-To: linton@marktwain.rad.sgi.com (Mark Linton)
Organization: sgi
Lines: 28