Merge pull request #1196 from zed-industries/context-menu-max-width

Antonio Scandurra created

Cap context menu's width to cover at most 70% of the window

Change summary

crates/editor/src/element.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Detailed changes

crates/editor/src/element.rs 🔗

@@ -1264,7 +1264,7 @@ impl Element for EditorElement {
                 SizeConstraint {
                     min: Vector2F::zero(),
                     max: vec2f(
-                        f32::INFINITY,
+                        cx.window_size.x() * 0.7,
                         (12. * line_height).min((size.y() - line_height) / 2.),
                     ),
                 },