mirror of
https://github.com/emilk/egui.git
synced 2026-06-28 07:23:13 -04:00
Add workaround for max_width
set_max_width and set_max_height will limit intrinsic size but not max_rect itself
This commit is contained in:
@@ -89,12 +89,13 @@ fn main() -> eframe::Result {
|
||||
MenuButton::new("Menu")
|
||||
.config(MenuConfig::new().close_behavior(PopupCloseBehavior::CloseOnClickOutside))
|
||||
.ui(ui, |ui| {
|
||||
// ui.set_max_width(180.0);
|
||||
ui.set_max_width(180.0);
|
||||
if ui.button("Close menu").clicked() {
|
||||
ui.close_menu();
|
||||
}
|
||||
ui.collapsing("Collapsing", |ui| {
|
||||
egui::ScrollArea::both().show(ui, |ui| {
|
||||
// ui.set_width(ui.available_width());
|
||||
for _ in 0..10 {
|
||||
ui.label(
|
||||
"This is a long text label containing \
|
||||
|
||||
Reference in New Issue
Block a user