chore: fix some performance issues (#6)
Some checks failed
Rust / build (ubuntu-latest, stable) (push) Failing after 1m14s
Some checks failed
Rust / build (ubuntu-latest, stable) (push) Failing after 1m14s
Reviewed-on: #6
This commit was merged in pull request #6.
This commit is contained in:
@@ -1094,13 +1094,10 @@ impl Render for PopupMenu {
|
||||
self.update_submenu_menu_anchor(window);
|
||||
|
||||
let max_width = self.max_width();
|
||||
let max_height = self.max_height.map_or_else(
|
||||
|| {
|
||||
let window_half_height = window.window_bounds().get_bounds().size.height * 0.5;
|
||||
window_half_height.min(px(450.))
|
||||
},
|
||||
|height| height,
|
||||
);
|
||||
let max_height = self.max_height.unwrap_or_else(|| {
|
||||
let window_half_height = window.window_bounds().get_bounds().size.height * 0.5;
|
||||
window_half_height.min(px(450.))
|
||||
});
|
||||
|
||||
let view = cx.entity().clone();
|
||||
let items_count = self.menu_items.len();
|
||||
|
||||
Reference in New Issue
Block a user