Content overlaps with ui.add_space(ui.available_width()) #4936
-
fn start_end_ui(ui: &mut Ui) {
ui.with_layout(Layout::left_to_right(egui::Align::Min), |ui| {
ui.label("Start Item");
ui.with_layout(Layout::right_to_left(egui::Align::Min), |ui| {
ui.add_space(ui.available_width());
ui.label("End Item");
});
});
} If you comment this code, it appears normal. // ui.add_space(ui.available_width()); code repo: https://github.com/paulzhang5511/eguidemo |
Beta Was this translation helpful? Give feedback.
Answered by
paulzhang5511
Aug 8, 2024
Replies: 1 comment
-
I got the execution logic of the code wrong. fn start_end_ui(ui: &mut Ui) {
ui.with_layout(Layout::left_to_right(egui::Align::Min), |ui| {
ui.label("Start Item");
ui.with_layout(Layout::right_to_left(egui::Align::Min), |ui| {
ui.label("End Item");
ui.add_space(ui.available_width());
});
});
} |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
paulzhang5511
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I got the execution logic of the code wrong.