Skip to content

Commit 0ec449a

Browse files
Merge pull request #94 from voltagecloud/fix/gpui-long-inline-code-dark-background
fix(gpui): readable long inline code in dark mode
2 parents f726f1c + 392b39a commit 0ec449a

3 files changed

Lines changed: 12 additions & 0 deletions

File tree

‎apps/buzz-gpui/crates/app/src/ui/agents2/memory.rs‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -634,6 +634,10 @@ fn memory_body(key: &str, body: &str, rich: bool, cx: &App) -> AnyElement {
634634
.with_link(c.text_link)
635635
.with_border(c.border_standard)
636636
.with_code_background(c.affordance_subtle)
637+
.with_inline_code(HighlightStyle {
638+
background_color: Some(c.affordance_subtle),
639+
..Default::default()
640+
})
637641
.with_selection(c.text_link.opacity(0.25));
638642
TextView::markdown(
639643
SharedString::from(format!("memory-body-{key}")),

‎apps/buzz-gpui/crates/app/src/ui/markdown.rs‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2004,6 +2004,10 @@ fn text_style(color: Hsla, c: &buzz_ui::Colors) -> TextViewStyle {
20042004
.with_link(c.text_link)
20052005
.with_border(c.border_standard)
20062006
.with_code_background(c.affordance_subtle)
2007+
.with_inline_code(HighlightStyle {
2008+
background_color: Some(c.affordance_subtle),
2009+
..Default::default()
2010+
})
20072011
.with_selection(c.text_link.opacity(0.25))
20082012
.with_paragraph_gap(rems(0.))
20092013
}

‎apps/buzz-gpui/crates/app/src/ui/settings/updates.rs‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,10 @@ fn notes(cx: &App) -> Option<AnyElement> {
221221
.with_link(c.text_link)
222222
.with_border(c.border_standard)
223223
.with_code_background(c.affordance_subtle)
224+
.with_inline_code(HighlightStyle {
225+
background_color: Some(c.affordance_subtle),
226+
..Default::default()
227+
})
224228
.with_selection(c.text_link.opacity(0.25));
225229
let view_on_github = button("update-release-page", "View on GitHub")
226230
.icon_end(IconName::ArrowSquareOut)

0 commit comments

Comments
 (0)