Skip to content

egui::Window Does Not Auto-Resize Correctly with .auto_sized() #5733

Open
@4r33x

Description

I am using the following dependencies on the web:

egui = {version = "0.31.0", features = ["persistence", "serde"]}
eframe = { version = "0.31.0", default-features = false, features = [
    "default_fonts", 
    "glow",         
    "persistence",   
    "wayland", 
] }

Problem:

The following egui::Window code does not auto-resize to its content correctly. Instead, it retains an incorrect size for example if I enter very long number in egui::DragValue and then clear it to default short one

 egui::Window::new("Bugged Window")
            .title_bar(false)
            .auto_sized()
            .show(ctx, |ui| {
                ui.add(
                        egui::DragValue::new(&mut self.test_value)
                            .speed(0.5)
                            .max_decimals(6),
                    );
            });

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    bugSomething is broken

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions