#5525: Implement archiving in layouting classes -------------------------------------+-------------------------------------- Reporter: mmadia | Owner: bonefish Type: enhancement | Status: in-progress Priority: normal | Milestone: Component: Kits/Interface Kit | Version: R1/Development Resolution: | Keywords: Blocked By: 6256, 6257, 6302, 6314 | Has a Patch: 1 Platform: All | Blocking: 5524 -------------------------------------+-------------------------------------- Comment (by bonefish): Applied the BSplitLayout patch in r37548. Remarks: {{{ +// archivng constants +namespace { + const char* kInfoCollapsibleField = "BSplitLayout::info::collapsible"; + const char* kInfoWeightField = "BSplitLayout::info::weight"; + const char* kSpacingField = "BSplitLayout::spacing"; + const char* kSplitterSizeField = "BSplitLayout::splitterSize"; + const char* kIsVerticalField = "BSplitLayout::vertical"; + const char* kTopInsetField = "BSplitLayout::TopInset"; + const char* kBottomInsetField = "BSplitLayout::BottomInset"; + const char* kLeftInsetField = "BSplitLayout::LeftInset"; + const char* kRightInsetField = "BSplitLayout::RightInset"; +} }}} I noticed, the naming of the fields varies a lot between the classes (real class name or not, one or two colons as separator, case). Even just here the case is inconsistent. {{{ void BSplitLayout::_LayoutItem(BLayoutItem* item, ItemLayoutInfo* info) { @@ -806,6 +939,7 @@ item->AlignInFrame(info->layoutFrame); + // TODO: shouldn't this be done (as needed) by item->SetVisible(); // if the item became visible, we need to update its internal layout if (visibilityChanged) { if (BView* itemView = item->View()) }}} I removed the TODO, but good question. I believe in this case the deal is that an immediate relayout of the view is desired. `item->SetVisible()`, which for BViewLayoutItems just calls `BView::Show()`, would trigger the relayout as well, but asynchronously. The relayout could therefore happen after potentially already pending mouse moved events, which might confuse the split layout. I have to admit the workings of the split view/layout are rather complicated and have weird dependencies and side effects (and I don't pretend to still know them all). I'd be very careful with changing something and also check more obscure setups including nested split views with height-for-width items. -- Ticket URL: <http://dev.haiku-os.org/ticket/5525#comment:19> Haiku <http://dev.haiku-os.org> Haiku - the operating system.