Skip to content

[#109.1] Fix jumping effect on initial layout - ensure consistent sizing from startup #126

Description

@thomasnemer

Parent Issue

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

Problem

The initial layout differs significantly from the layout after the first window resize, creating a visible "jump" when the user first resizes the window.

Expected: Panels should appear at their intended sizes immediately on startup and maintain those sizes consistently.

Observed: Initial layout is incorrect, then "snaps" to correct layout on first resize.

Root Cause Investigation Needed

Focus on understanding when and how originalWidth and originalHeight are initialized:

  • Component::setAxisResizeBehavior() - initialization timing
  • Component::setBounds() - how per-axis behavior is applied initially
  • Component::onParentResize() - dimension tracking on first layout

Reproduction

  1. Build and run the demo app: mise demo
  2. Observe the initial panel layout (note widths/heights)
  3. Resize window - observe the "jump" to correct layout

Success Criteria

  • Initial layout matches post-resize layout
  • No visual "jumping" on first window resize
  • Original dimensions correctly captured at component creation
  • Test in demo app confirms fix

Related Code

  • include/bombfork/prong/core/component.h
  • examples/demo_app/scenes/demo_scene.h

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