mirror of
https://github.com/emilk/egui.git
synced 2026-08-29 04:40:03 -04:00
Turn off text wrapping by default in combo-box popups (#3912)
This trips up a lot of users
This commit is contained in:
@@ -365,7 +365,15 @@ fn combo_box_dyn<'c, R>(
|
||||
|ui| {
|
||||
ScrollArea::vertical()
|
||||
.max_height(height)
|
||||
.show(ui, menu_contents)
|
||||
.show(ui, |ui| {
|
||||
// Often the button is very narrow, which means this popup
|
||||
// is also very narrow. Having wrapping on would therefore
|
||||
// result in labels that wrap very early.
|
||||
// Instead, we turn it off by default so that the labels
|
||||
// expand the width of the menu.
|
||||
ui.style_mut().wrap = Some(false);
|
||||
menu_contents(ui)
|
||||
})
|
||||
.inner
|
||||
},
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user