From 38186fe23e7b356b37ada3e0dd3387a90b5e2002 Mon Sep 17 00:00:00 2001 From: Emil Ernerfeldt Date: Sun, 9 May 2021 13:20:27 +0200 Subject: [PATCH] Add a TODO --- egui/src/ui.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/egui/src/ui.rs b/egui/src/ui.rs index 996093e5..0d528b3b 100644 --- a/egui/src/ui.rs +++ b/egui/src/ui.rs @@ -832,6 +832,10 @@ impl Ui { /// ui.add_sized([40.0, 20.0], egui::DragValue::new(&mut my_value)); /// ``` pub fn add_sized(&mut self, max_size: impl Into, widget: impl Widget) -> Response { + // TODO: configure to overflow to main_dir instead of centered overflow + // to handle the bug mentioned at https://github.com/emilk/egui/discussions/318#discussioncomment-627578 + // and fixed in https://github.com/emilk/egui/commit/035166276322b3f2324bd8b97ffcedc63fa8419f + // // Make sure we keep the same main direction since it changes e.g. how text is wrapped: let layout = Layout::centered_and_justified(self.layout().main_dir()); self.allocate_ui_with_layout(max_size.into(), layout, |ui| ui.add(widget))