Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
4r33x opened this issue Feb 19, 2025 · 0 comments
Open

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

4r33x opened this issue Feb 19, 2025 · 0 comments
Labels
bug Something is broken

Comments

@4r33x
Copy link

4r33x commented Feb 19, 2025

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),
                    );
            });
@4r33x 4r33x added the bug Something is broken label Feb 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is broken
Projects
None yet
Development

No branches or pull requests

1 participant