From dad7d94b4be7a287192ba330f10b14ddb18e92a7 Mon Sep 17 00:00:00 2001
From: Stanislav Alekseev <43210583+WeetHet@users.noreply.github.com>
Date: Tue, 13 May 2025 19:04:11 +0300
Subject: [PATCH] editor: Fix signature hover popover incorrect width instead
of adapting to its content (#30646)
Before:
After:
----
Release Notes:
- Fixed issue where signature popover displayed at incorrect width
instead of adapting to its content.
----
cc @smitbarmase
---
crates/editor/src/element.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/crates/editor/src/element.rs b/crates/editor/src/element.rs
index 37178601d7292b74047eec02f19d4a5204c428a2..9434ae4ad79ba8a465bd6d615ac06c57ecc1ac2b 100644
--- a/crates/editor/src/element.rs
+++ b/crates/editor/src/element.rs
@@ -4330,7 +4330,7 @@ impl EditorElement {
let target_y = selection_row.as_f32() * line_height - scroll_pixel_position.y;
let target_point = content_origin + point(target_x, target_y);
- let actual_size = element.layout_as_root(max_size.into(), window, cx);
+ let actual_size = element.layout_as_root(Size::::default(), window, cx);
let overall_height = actual_size.height + HOVER_POPOVER_GAP;
let popover_origin = if target_point.y > overall_height {