Skip to content

SidePanel::rights with an exact_width have incorrect padding #4126

@a99984b1799

Description

@a99984b1799

Describe the bug

SidePanel::right incorrectly pads the right side of the panel when it has an exact_width set.

To Reproduce

The following update function roughly implements the screenshot below:

fn update(&mut self, ctx: &egui::Context, _: &mut eframe::Frame) {
    egui::SidePanel::right("right").exact_width(100.).show(ctx, |ui| {
        ui.label("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA");
    });
    egui::SidePanel::left("left").exact_width(100.).show(ctx, |ui| {
        ui.label("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA");
    });
    egui::CentralPanel::default().show(ctx, |ui| { });
}

Screenshots

Desktop (please complete the following information):

  • OS: Linux.

Additional Information

As implied, the padding is correct when an exact_width is not given.

Metadata

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