Skip to content

[#109.2] Fix asymmetric resize behavior - components should maintain FIXED size in both directions #127

Description

@thomasnemer

Parent Issue

Part of #109 - Window resize behavior conflicts with component sizing

Problem

Components with AxisResizeBehavior::FIXED appear to grow when the window expands, but do not shrink back when the window contracts.

Expected: Components with FIXED axis behavior should maintain their original size regardless of window resize direction.

Observed: Fixed-size components still affected by layout during shrinking operations.

Potential Causes

  • Interaction between FlexLayout's shrink factors and component resize behavior
  • Min/max size constraints not being properly applied
  • Original dimensions being recalculated incorrectly during shrink operations
  • setBounds() calls from layout manager overriding resize behavior

Reproduction

  1. Build and run the demo app: mise demo
  2. Expand window vertically - observe panel heights
  3. Shrink window vertically - observe if panels shrink correctly (they shouldn't if FIXED)
  4. Repeat with horizontal resizing

Success Criteria

  • FIXED components maintain original size during window expansion
  • FIXED components maintain original size during window contraction
  • Behavior is symmetric in both resize directions
  • Test in demo app with left panel (300px width) and right panel (320px width)
  • Add/update unit tests for symmetric resize behavior

Related Code

  • include/bombfork/prong/core/component.h - onParentResize(), setBounds()
  • include/bombfork/prong/layout/flex_layout.h - shrink factor interaction
  • tests/test_axis_resize.cpp

Dependencies

Should be worked on after #109.1 to ensure baseline behavior is correct.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions