workspace: Fix overflow in error popup (#59185)
Release Notes: - Fixed an issue where the close button could overflow within a workspace error popup. --------- Co-authored-by: Lukas Wirth <lukas@zed.dev> Co-authored-by: Lukas Wirth <me@lukaswirth.dev>
This commit is contained in:
1 parent
bb8ebad6b8
commit
e1505316e0
2 files changed
+9
-6
No files matched your search
@@ -977,6 +977,7 @@ pub mod simple_message_notification {
|
||||
|
||||
let copy_text = self.copy_text.clone();
|
||||
let header_actions = h_flex()
|
||||
.flex_shrink_0()
|
||||
.gap_1()
|
||||
.when_some(copy_text, |el, text| {
|
||||
el.child(
|
||||
@@ -1157,6 +1158,8 @@ pub mod simple_message_notification {
|
||||
.items_start()
|
||||
.child(
|
||||
v_flex()
|
||||
.flex_1()
|
||||
.min_w_0()
|
||||
.gap_0p5()
|
||||
.when_some(self.title.clone(), |div, title| {
|
||||
div.child(Label::new(title))
|
||||
@@ -1270,13 +1273,11 @@ pub mod simple_message_notification {
|
||||
struct LanguageServerError;
|
||||
impl WorkspaceError for LanguageServerError {
|
||||
fn primary_message(&self) -> SharedString {
|
||||
"Couldn't reach the language server.".into()
|
||||
"Error: Prepare rename via rust-analyzer failed: No references found at position"
|
||||
.into()
|
||||
}
|
||||
fn secondary_message(&self) -> Option<SharedString> {
|
||||
Some(
|
||||
"Make sure the server is installed and your network connection is working."
|
||||
.into(),
|
||||
)
|
||||
None
|
||||
}
|
||||
fn primary_action(&self) -> ErrorAction {
|
||||
ErrorAction::dismiss()
|
||||
|
||||
@@ -1324,7 +1324,9 @@ fn register_actions(
|
||||
|
||||
impl WorkspaceError for DebugError {
|
||||
fn primary_message(&self) -> SharedString {
|
||||
SharedString::new_static("This is an error.")
|
||||
SharedString::new_static(
|
||||
"Error: Prepare rename via rust-analyzer failed: No references found at position",
|
||||
)
|
||||
}
|
||||
|
||||
fn severity(&self) -> ErrorSeverity {
|
||||
|
||||
Reference in new issue
Block a user