Skip to content

Regression in 0.3.14: UI layouts incorrectly when parent is smaller than child #534

Description

@Noxime

Regressed when moving from 0.3.13 to 0.3.14. When an UI element (here a Group is smaller or equal to its parent size, it moves down by its height.

Minimum working example:

fn conf() -> Conf {
    Conf {
        window_width: 800,
        ..Default::default()
    }
}

#[macroquad::main(conf)]
async fn main() {
    loop {
        clear_background(GREEN);
        
        root_ui().group(hash!(), vec2(800.0, 200.0), |ui| {
            ui.label(vec2(20.0, 30.0), "Hello world");
        });

        next_frame().await
    }
}
Version Larger Smaller
0.3.13 image < image >
0.3.14 - 0.3.25, master #50c8feb image image

Discovered in Noxime/steamworks-rs#113

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions