From ab70555a8a290804386e698e1661c299e5da2fbc Mon Sep 17 00:00:00 2001 From: Bartosz Kaszubowski Date: Tue, 14 Oct 2025 15:16:05 +0200 Subject: [PATCH] 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 Screenshot 2025-10-13 at 19 33 37 ### After Screenshot 2025-10-13 at 19 33 10 --------- Co-authored-by: Danilo Leal --- crates/git_ui/src/blame_ui.rs | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/crates/git_ui/src/blame_ui.rs b/crates/git_ui/src/blame_ui.rs index 469392ee1d8b288d34a58dba78d2ae325602a71b..31726dc0b33c5274519c7b77b61c10609ac3bfcc 100644 --- a/crates/git_ui/src/blame_ui.rs +++ b/crates/git_ui/src/blame_ui.rs @@ -8,8 +8,8 @@ use git::{ repository::CommitSummary, }; use gpui::{ - ClipboardItem, Entity, Hsla, MouseButton, ScrollHandle, Subscription, TextStyle, WeakEntity, - prelude::*, + ClipboardItem, Entity, Hsla, MouseButton, ScrollHandle, Subscription, TextStyle, + TextStyleRefinement, UnderlineStyle, WeakEntity, prelude::*, }; use markdown::{Markdown, MarkdownElement}; use project::{git_store::Repository, project_settings::ProjectSettings}; @@ -208,11 +208,21 @@ impl BlameRenderer for GitBlameRenderer { OffsetDateTime::now_utc(), time_format::TimestampFormat::MediumAbsolute, ); + let link_color = cx.theme().colors().text_accent; let markdown_style = { let mut style = hover_markdown_style(window, cx); if let Some(code_block) = &style.code_block.text { style.base_text_style.refine(code_block); } + style.link.refine(&TextStyleRefinement { + color: Some(link_color), + underline: Some(UnderlineStyle { + color: Some(link_color.opacity(0.4)), + thickness: px(1.0), + ..Default::default() + }), + ..Default::default() + }); style };