[haiku-bugs] Re: [Haiku] #6979: Layout API bugs in Network

  • From: "yourpalal" <trac@xxxxxxxxxxxx>
  • Date: Fri, 08 Apr 2011 21:45:03 -0000

#6979: Layout API bugs in Network
----------------------------------+----------------------------
   Reporter:  axeld               |      Owner:  yourpalal
       Type:  bug                 |     Status:  in-progress
   Priority:  normal              |  Milestone:  R1
  Component:  Kits/Interface Kit  |    Version:  R1/Development
 Resolution:                      |   Keywords:
 Blocked By:                      |   Blocking:  5524
Has a Patch:  0                   |   Platform:  All
----------------------------------+----------------------------
Changes (by yourpalal):

 * status:  assigned => in-progress
 * blocking:   => 5524


Comment:

 After looking into this, I think these two issues are symptoms of a larger
 one. Basically, in a BGridLayout, empty rows/cols are given no special
 consideration. Without items adding any constraints to a row or column,
 the max size for that row/column defaults to B_SIZE_UNLIMITED, which means
 that it will soak up any extra space in the layout (which is why the row
 isn't collapsing when the BMenuField is hidden). Also, empty rows and
 columns still have spacing applied, because they are not considered to be
 special.

 What I'm thinking is to catch empty rows and columns (in
 BTwoDimensionalLayout) and basically discard them this means for layout
 purposes, they would take up no space, and not add any spacing. This
 situation is complicated a bit by the
 BTwoDimensionalLayout::AlignLayoutWith() feature, but when a layout is
 aligned with another, this would be disabled (maybe if both have the same
 empty row or column, we could still discard it). There could be a problem
 where applications rely on the current behaviour, but this could mostly be
 worked around by adding a BSpaceLayoutItem to the layout (which is more
 correct, anyway).

-- 
Ticket URL: <http://dev.haiku-os.org/ticket/6979#comment:3>
Haiku <http://dev.haiku-os.org>
Haiku - the operating system.

Other related posts: