Skip to content

Commit ab70555

Browse files
Simekdanilo-leal
andauthored
git_ui: Apply accented color to links in Blame tooltip (#40124)
# Why Follow up to: * #39905 # How Apply accented color to links in message content inside Blame tooltip, to match appearance in Markdown Preview panel. Release Notes: - Improved appearance of links in message content inside Blame tooltip. # Preview ### Before <img width="1186" height="798" alt="Screenshot 2025-10-13 at 19 33 37" src="https://github.com/user-attachments/assets/33ab4fb5-7910-4d28-9152-c692d6ddeaa6" /> ### After <img width="1186" height="798" alt="Screenshot 2025-10-13 at 19 33 10" src="https://github.com/user-attachments/assets/38082c5c-50d6-4fb3-90ca-410accff9aad" /> --------- Co-authored-by: Danilo Leal <[email protected]>
1 parent 474eb8d commit ab70555

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

crates/git_ui/src/blame_ui.rs

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ use git::{
88
repository::CommitSummary,
99
};
1010
use gpui::{
11-
ClipboardItem, Entity, Hsla, MouseButton, ScrollHandle, Subscription, TextStyle, WeakEntity,
12-
prelude::*,
11+
ClipboardItem, Entity, Hsla, MouseButton, ScrollHandle, Subscription, TextStyle,
12+
TextStyleRefinement, UnderlineStyle, WeakEntity, prelude::*,
1313
};
1414
use markdown::{Markdown, MarkdownElement};
1515
use project::{git_store::Repository, project_settings::ProjectSettings};
@@ -208,11 +208,21 @@ impl BlameRenderer for GitBlameRenderer {
208208
OffsetDateTime::now_utc(),
209209
time_format::TimestampFormat::MediumAbsolute,
210210
);
211+
let link_color = cx.theme().colors().text_accent;
211212
let markdown_style = {
212213
let mut style = hover_markdown_style(window, cx);
213214
if let Some(code_block) = &style.code_block.text {
214215
style.base_text_style.refine(code_block);
215216
}
217+
style.link.refine(&TextStyleRefinement {
218+
color: Some(link_color),
219+
underline: Some(UnderlineStyle {
220+
color: Some(link_color.opacity(0.4)),
221+
thickness: px(1.0),
222+
..Default::default()
223+
}),
224+
..Default::default()
225+
});
216226
style
217227
};
218228

0 commit comments

Comments
 (0)