From 96a5daaf3f5a4424840705ba282c11ed5c4e8e77 Mon Sep 17 00:00:00 2001
From: Danilo Leal <67129314+danilo-leal@users.noreply.github.com>
Date: Mon, 16 Sep 2024 07:12:24 -0400
Subject: [PATCH] Refine symbolic link project tooltip (#17869)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
This PR uses the tooltip with meta to display the info that a project
panel item is actually a symbolic link.
| Before | After |
|--------|--------|
|
|
|
Release Notes:
- N/A
---
crates/project_panel/src/project_panel.rs | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/crates/project_panel/src/project_panel.rs b/crates/project_panel/src/project_panel.rs
index c8e1ce28eb5938656e07142e65f1064fbfd64b2a..cd4196dbc67b159fd85e5e2eedc6fa733e80392b 100644
--- a/crates/project_panel/src/project_panel.rs
+++ b/crates/project_panel/src/project_panel.rs
@@ -2298,7 +2298,7 @@ impl ProjectPanel {
.id("symlink_icon")
.pr_3()
.tooltip(move |cx| {
- Tooltip::text(format!("{path} • Symbolic Link"), cx)
+ Tooltip::with_meta(path.to_string(), None, "Symbolic Link", cx)
})
.child(
Icon::new(IconName::ArrowUpRight)
@@ -2767,7 +2767,6 @@ impl Render for ProjectPanel {
.track_focus(&self.focus_handle)
.child(
Button::new("open_project", "Open a project")
- .style(ButtonStyle::Filled)
.full_width()
.key_binding(KeyBinding::for_action(&workspace::Open, cx))
.on_click(cx.listener(|this, _, cx| {