Add a TODO
This commit is contained in:
parent
5a21bc78a6
commit
38186fe23e
1 changed files with 4 additions and 0 deletions
|
@ -832,6 +832,10 @@ impl Ui {
|
||||||
/// ui.add_sized([40.0, 20.0], egui::DragValue::new(&mut my_value));
|
/// ui.add_sized([40.0, 20.0], egui::DragValue::new(&mut my_value));
|
||||||
/// ```
|
/// ```
|
||||||
pub fn add_sized(&mut self, max_size: impl Into<Vec2>, widget: impl Widget) -> Response {
|
pub fn add_sized(&mut self, max_size: impl Into<Vec2>, 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:
|
// 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());
|
let layout = Layout::centered_and_justified(self.layout().main_dir());
|
||||||
self.allocate_ui_with_layout(max_size.into(), layout, |ui| ui.add(widget))
|
self.allocate_ui_with_layout(max_size.into(), layout, |ui| ui.add(widget))
|
||||||
|
|
Loading…
Reference in a new issue