From: Foster B. <fbr...@ad...> - 2009-05-20 23:33:19
|
The problem is that I'm in a widget implementation that needs the widget to own the entire rect pertaining to its widget's pixels on the screen- including the outsets- otherwise those regions outside the widget's rect won't be drawn properly. For example when I have a button that is 80x20, I need the widget to be 88x28 to account for the 4-pixel-per-size focus ring. This means I need to take into account the total extents of the widget, but only for measurement; at layout time I need to inset the actual widget to account for outsets, which is throwing off my baselines. Blessings, Foster On 20/05/09 1:42 PM, "Sean Parent" <sp...@ad...> wrote: > outsets don't affect layout or placement. They play two roles: > > For a creating container which lacks a frame, the outset of a child > may become part of the outset of the container. This is to make sure > that the container is large enough to hold the child. > > If outsets collide with a visible element, the engine will assert. > > If your container is creating, it may not be handling it's own outset > correctly. > > Sean > > On May 20, 2009, at 1:36 PM, Foster Brereton wrote: > >> I'm trying to place two widgets in a row. One has no vertical outsets, >> another does. Both have baselines. When I place them I set their top >> value >> to be top(placement) - top_outset, which lines them up correctly with >> respect to each other and their containers, but messes up the baseline >> alignment. When I set their top value to be simply top(placement), >> their >> baselines match up but they aren't placed properly vertically (e.g., >> the >> distance from their top outset to their neighbor's bottom is the >> container's >> spacing, which is too much.) What am I missing? >> >> Blessings, >> Foster >> >> >> -- >> Foster T. Brereton <ἰχθύς>< Ro >> 3:21-26 >> Computer Scientist 2 --- Photoshop Engineering --- Adobe Systems >> "What 99 percent of programmers need to know is not how to build >> components but how to use them." -- Alexander Stepanov >> >> > -- Foster T. Brereton <ἰχθύς>< Ro 3:21-26 Computer Scientist 2 --- Photoshop Engineering --- Adobe Systems "What 99 percent of programmers need to know is not how to build components but how to use them." -- Alexander Stepanov |