Turn off text wrapping by default in combo-box popups (#3912)
This trips up a lot of users
This commit is contained in:
parent
13b59fb0d4
commit
1d1b07c6b2
|
|
@ -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
|
||||
},
|
||||
);
|
||||
|
|
|
|||
Loading…
Reference in New Issue