Use breadcrumb.background from VS Code for toolbar background (#3559)

This PR changes the color we use for the toolbar background from the VS
Code theme to `breadcrumb.background`.

If this value isn't set then we fall back to the `editor.background`.

Release Notes:

- N/A
This commit is contained in:
Marshall Bowers 2023-12-08 14:03:18 -05:00 committed by GitHub
parent 1d35a815a6
commit 1c850f495c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 37 additions and 31 deletions

View File

@ -241,7 +241,7 @@ pub fn andromeda() -> UserThemeFamily {
text: Some(rgba(0xd5ced9ff).into()),
status_bar_background: Some(rgba(0x23262eff).into()),
title_bar_background: Some(rgba(0x23262eff).into()),
toolbar_background: Some(rgba(0x23262eff).into()),
toolbar_background: Some(rgba(0x262a33ff).into()),
tab_bar_background: Some(rgba(0x23262eff).into()),
tab_inactive_background: Some(rgba(0x23262eff).into()),
tab_active_background: Some(rgba(0x262a33ff).into()),

View File

@ -34,6 +34,7 @@ pub fn gruvbox() -> UserThemeFamily {
text: Some(rgba(0xebdbb2ff).into()),
status_bar_background: Some(rgba(0x1d2021ff).into()),
title_bar_background: Some(rgba(0x1d2021ff).into()),
toolbar_background: Some(rgba(0x1d2021ff).into()),
tab_bar_background: Some(rgba(0x1d2021ff).into()),
tab_inactive_background: Some(rgba(0x1d2021ff).into()),
tab_active_background: Some(rgba(0x32302fff).into()),
@ -317,6 +318,7 @@ pub fn gruvbox() -> UserThemeFamily {
text: Some(rgba(0xebdbb2ff).into()),
status_bar_background: Some(rgba(0x282828ff).into()),
title_bar_background: Some(rgba(0x282828ff).into()),
toolbar_background: Some(rgba(0x282828ff).into()),
tab_bar_background: Some(rgba(0x282828ff).into()),
tab_inactive_background: Some(rgba(0x282828ff).into()),
tab_active_background: Some(rgba(0x3c3836ff).into()),
@ -600,6 +602,7 @@ pub fn gruvbox() -> UserThemeFamily {
text: Some(rgba(0xebdbb2ff).into()),
status_bar_background: Some(rgba(0x32302fff).into()),
title_bar_background: Some(rgba(0x32302fff).into()),
toolbar_background: Some(rgba(0x32302fff).into()),
tab_bar_background: Some(rgba(0x32302fff).into()),
tab_inactive_background: Some(rgba(0x32302fff).into()),
tab_active_background: Some(rgba(0x504945ff).into()),
@ -883,6 +886,7 @@ pub fn gruvbox() -> UserThemeFamily {
text: Some(rgba(0x3c3836ff).into()),
status_bar_background: Some(rgba(0xf9f5d7ff).into()),
title_bar_background: Some(rgba(0xf9f5d7ff).into()),
toolbar_background: Some(rgba(0xf9f5d7ff).into()),
tab_bar_background: Some(rgba(0xf9f5d7ff).into()),
tab_inactive_background: Some(rgba(0xf9f5d7ff).into()),
tab_active_background: Some(rgba(0xf2e5bcff).into()),
@ -1166,6 +1170,7 @@ pub fn gruvbox() -> UserThemeFamily {
text: Some(rgba(0x3c3836ff).into()),
status_bar_background: Some(rgba(0xfbf1c7ff).into()),
title_bar_background: Some(rgba(0xfbf1c7ff).into()),
toolbar_background: Some(rgba(0xfbf1c7ff).into()),
tab_bar_background: Some(rgba(0xfbf1c7ff).into()),
tab_inactive_background: Some(rgba(0xfbf1c7ff).into()),
tab_active_background: Some(rgba(0xebdbb2ff).into()),
@ -1449,6 +1454,7 @@ pub fn gruvbox() -> UserThemeFamily {
text: Some(rgba(0x3c3836ff).into()),
status_bar_background: Some(rgba(0xf2e5bcff).into()),
title_bar_background: Some(rgba(0xf2e5bcff).into()),
toolbar_background: Some(rgba(0xf2e5bcff).into()),
tab_bar_background: Some(rgba(0xf2e5bcff).into()),
tab_inactive_background: Some(rgba(0xf2e5bcff).into()),
tab_active_background: Some(rgba(0xd5c4a1ff).into()),

View File

@ -286,7 +286,7 @@ pub fn night_owl() -> UserThemeFamily {
text: Some(rgba(0x403f53ff).into()),
status_bar_background: Some(rgba(0xf0f0f0ff).into()),
title_bar_background: Some(rgba(0xf0f0f0ff).into()),
toolbar_background: Some(rgba(0xf0f0f0ff).into()),
toolbar_background: Some(rgba(0xfbfbfbff).into()),
tab_bar_background: Some(rgba(0xf0f0f0ff).into()),
tab_inactive_background: Some(rgba(0xf0f0f0ff).into()),
tab_active_background: Some(rgba(0xf6f6f6ff).into()),

View File

@ -36,7 +36,7 @@ pub fn noctis() -> UserThemeFamily {
text: Some(rgba(0xbecfdaff).into()),
status_bar_background: Some(rgba(0x07273bff).into()),
title_bar_background: Some(rgba(0x07273bff).into()),
toolbar_background: Some(rgba(0x051b29ff).into()),
toolbar_background: Some(rgba(0x07273bff).into()),
tab_bar_background: Some(rgba(0x09334eff).into()),
tab_inactive_background: Some(rgba(0x09334eff).into()),
tab_active_background: Some(rgba(0x07273bff).into()),
@ -306,7 +306,7 @@ pub fn noctis() -> UserThemeFamily {
text: Some(rgba(0xcbbec2ff).into()),
status_bar_background: Some(rgba(0x322a2dff).into()),
title_bar_background: Some(rgba(0x322a2dff).into()),
toolbar_background: Some(rgba(0x272022ff).into()),
toolbar_background: Some(rgba(0x322a2dff).into()),
tab_bar_background: Some(rgba(0x413036ff).into()),
tab_inactive_background: Some(rgba(0x413036ff).into()),
tab_active_background: Some(rgba(0x322a2dff).into()),
@ -576,7 +576,7 @@ pub fn noctis() -> UserThemeFamily {
text: Some(rgba(0x005661ff).into()),
status_bar_background: Some(rgba(0xcaedf2ff).into()),
title_bar_background: Some(rgba(0xe7f2f3ff).into()),
toolbar_background: Some(rgba(0xe1eeefff).into()),
toolbar_background: Some(rgba(0xf4f6f6ff).into()),
tab_bar_background: Some(rgba(0xcaedf2ff).into()),
tab_inactive_background: Some(rgba(0xcaedf2ff).into()),
tab_active_background: Some(rgba(0xf4f6f6ff).into()),
@ -846,7 +846,7 @@ pub fn noctis() -> UserThemeFamily {
text: Some(rgba(0x0c006bff).into()),
status_bar_background: Some(rgba(0xe2dff6ff).into()),
title_bar_background: Some(rgba(0xedecf8ff).into()),
toolbar_background: Some(rgba(0xe9e7f3ff).into()),
toolbar_background: Some(rgba(0xf2f1f8ff).into()),
tab_bar_background: Some(rgba(0xe2dff6ff).into()),
tab_inactive_background: Some(rgba(0xe2dff6ff).into()),
tab_active_background: Some(rgba(0xf2f1f8ff).into()),
@ -1116,7 +1116,7 @@ pub fn noctis() -> UserThemeFamily {
text: Some(rgba(0x005661ff).into()),
status_bar_background: Some(rgba(0xf0e9d6ff).into()),
title_bar_background: Some(rgba(0xf9f1e1ff).into()),
toolbar_background: Some(rgba(0xf6eddaff).into()),
toolbar_background: Some(rgba(0xfef8ecff).into()),
tab_bar_background: Some(rgba(0xf0e9d6ff).into()),
tab_inactive_background: Some(rgba(0xf0e9d6ff).into()),
tab_active_background: Some(rgba(0xfef8ecff).into()),
@ -1386,7 +1386,7 @@ pub fn noctis() -> UserThemeFamily {
text: Some(rgba(0xc5cdd3ff).into()),
status_bar_background: Some(rgba(0x1b2932ff).into()),
title_bar_background: Some(rgba(0x1b2932ff).into()),
toolbar_background: Some(rgba(0x0e1920ff).into()),
toolbar_background: Some(rgba(0x1b2932ff).into()),
tab_bar_background: Some(rgba(0x24333dff).into()),
tab_inactive_background: Some(rgba(0x202e37ff).into()),
tab_active_background: Some(rgba(0x1b2932ff).into()),
@ -1656,7 +1656,7 @@ pub fn noctis() -> UserThemeFamily {
text: Some(rgba(0xb2cacdff).into()),
status_bar_background: Some(rgba(0x041d20ff).into()),
title_bar_background: Some(rgba(0x041d20ff).into()),
toolbar_background: Some(rgba(0x03191bff).into()),
toolbar_background: Some(rgba(0x052529ff).into()),
tab_bar_background: Some(rgba(0x062e32ff).into()),
tab_inactive_background: Some(rgba(0x062e32ff).into()),
tab_active_background: Some(rgba(0x052529ff).into()),
@ -1926,7 +1926,7 @@ pub fn noctis() -> UserThemeFamily {
text: Some(rgba(0xb2cacdff).into()),
status_bar_background: Some(rgba(0x031417ff).into()),
title_bar_background: Some(rgba(0x031417ff).into()),
toolbar_background: Some(rgba(0x020c0eff).into()),
toolbar_background: Some(rgba(0x031417ff).into()),
tab_bar_background: Some(rgba(0x062e32ff).into()),
tab_inactive_background: Some(rgba(0x062e32ff).into()),
tab_active_background: Some(rgba(0x031417ff).into()),
@ -2196,7 +2196,7 @@ pub fn noctis() -> UserThemeFamily {
text: Some(rgba(0xb2cacdff).into()),
status_bar_background: Some(rgba(0x031417ff).into()),
title_bar_background: Some(rgba(0x031417ff).into()),
toolbar_background: Some(rgba(0x020c0eff).into()),
toolbar_background: Some(rgba(0x031417ff).into()),
tab_bar_background: Some(rgba(0x062e32ff).into()),
tab_inactive_background: Some(rgba(0x062e32ff).into()),
tab_active_background: Some(rgba(0x031417ff).into()),
@ -2466,7 +2466,7 @@ pub fn noctis() -> UserThemeFamily {
text: Some(rgba(0xc5c2d6ff).into()),
status_bar_background: Some(rgba(0x292640ff).into()),
title_bar_background: Some(rgba(0x292640ff).into()),
toolbar_background: Some(rgba(0x1f1d30ff).into()),
toolbar_background: Some(rgba(0x292640ff).into()),
tab_bar_background: Some(rgba(0x2f2c49ff).into()),
tab_inactive_background: Some(rgba(0x2f2c49ff).into()),
tab_active_background: Some(rgba(0x292640ff).into()),
@ -2736,7 +2736,7 @@ pub fn noctis() -> UserThemeFamily {
text: Some(rgba(0xccbfd9ff).into()),
status_bar_background: Some(rgba(0x30243dff).into()),
title_bar_background: Some(rgba(0x30243dff).into()),
toolbar_background: Some(rgba(0x291d35ff).into()),
toolbar_background: Some(rgba(0x30243dff).into()),
tab_bar_background: Some(rgba(0x3d2e4dff).into()),
tab_inactive_background: Some(rgba(0x3d2e4dff).into()),
tab_active_background: Some(rgba(0x30243dff).into()),

View File

@ -594,7 +594,7 @@ pub fn palenight() -> UserThemeFamily {
text: Some(rgba(0xffffffff).into()),
status_bar_background: Some(rgba(0x25293aff).into()),
title_bar_background: Some(rgba(0x25293aff).into()),
toolbar_background: Some(rgba(0x25293aff).into()),
toolbar_background: Some(rgba(0x292d3eff).into()),
tab_bar_background: Some(rgba(0x31364aff).into()),
tab_inactive_background: Some(rgba(0x31364aff).into()),
tab_active_background: Some(rgba(0x25293aff).into()),

View File

@ -36,7 +36,7 @@ pub fn rose_pine() -> UserThemeFamily {
text: Some(rgba(0xe0def4ff).into()),
status_bar_background: Some(rgba(0x191724ff).into()),
title_bar_background: Some(rgba(0x191724ff).into()),
toolbar_background: Some(rgba(0x1f1d2eff).into()),
toolbar_background: Some(rgba(0x191724ff).into()),
tab_bar_background: Some(rgba(0x00000000).into()),
tab_inactive_background: Some(rgba(0x00000000).into()),
tab_active_background: Some(rgba(0x6e6a861a).into()),
@ -287,7 +287,7 @@ pub fn rose_pine() -> UserThemeFamily {
text: Some(rgba(0xe0def4ff).into()),
status_bar_background: Some(rgba(0x232136ff).into()),
title_bar_background: Some(rgba(0x232136ff).into()),
toolbar_background: Some(rgba(0x2a273fff).into()),
toolbar_background: Some(rgba(0x232136ff).into()),
tab_bar_background: Some(rgba(0x00000000).into()),
tab_inactive_background: Some(rgba(0x00000000).into()),
tab_active_background: Some(rgba(0x817c9c14).into()),
@ -538,7 +538,7 @@ pub fn rose_pine() -> UserThemeFamily {
text: Some(rgba(0x575279ff).into()),
status_bar_background: Some(rgba(0xfaf4edff).into()),
title_bar_background: Some(rgba(0xfaf4edff).into()),
toolbar_background: Some(rgba(0xfffaf3ff).into()),
toolbar_background: Some(rgba(0xfaf4edff).into()),
tab_bar_background: Some(rgba(0x00000000).into()),
tab_inactive_background: Some(rgba(0x00000000).into()),
tab_active_background: Some(rgba(0x6e6a860d).into()),

View File

@ -34,6 +34,7 @@ pub fn solarized() -> UserThemeFamily {
text: Some(rgba(0xbbbbbbff).into()),
status_bar_background: Some(rgba(0x00212bff).into()),
title_bar_background: Some(rgba(0x002c39ff).into()),
toolbar_background: Some(rgba(0x002b36ff).into()),
tab_bar_background: Some(rgba(0x004052ff).into()),
tab_inactive_background: Some(rgba(0x004052ff).into()),
tab_active_background: Some(rgba(0x002b37ff).into()),
@ -295,6 +296,7 @@ pub fn solarized() -> UserThemeFamily {
text: Some(rgba(0x333333ff).into()),
status_bar_background: Some(rgba(0xeee8d5ff).into()),
title_bar_background: Some(rgba(0xeee8d5ff).into()),
toolbar_background: Some(rgba(0xfdf6e3ff).into()),
tab_bar_background: Some(rgba(0xd9d2c2ff).into()),
tab_inactive_background: Some(rgba(0xd3cbb7ff).into()),
tab_active_background: Some(rgba(0xfdf6e3ff).into()),

View File

@ -28,6 +28,7 @@ pub fn synthwave_84() -> UserThemeFamily {
text: Some(rgba(0xffffffff).into()),
status_bar_background: Some(rgba(0x241b2fff).into()),
title_bar_background: Some(rgba(0x241b2fff).into()),
toolbar_background: Some(rgba(0x262335ff).into()),
tab_bar_background: Some(rgba(0x241b2fff).into()),
tab_inactive_background: Some(rgba(0x262335ff).into()),
editor_background: Some(rgba(0x262335ff).into()),

View File

@ -122,6 +122,11 @@ impl VsCodeThemeConverter {
fn convert_theme_colors(&self) -> Result<ThemeColorsRefinement> {
let vscode_colors = &self.theme.colors;
let vscode_editor_background = vscode_colors
.editor_background
.as_ref()
.traverse(|color| try_parse_color(&color))?;
Ok(ThemeColorsRefinement {
border: vscode_colors
.panel_border
@ -155,10 +160,7 @@ impl VsCodeThemeConverter {
.panel_background
.as_ref()
.traverse(|color| try_parse_color(&color))?,
background: vscode_colors
.editor_background
.as_ref()
.traverse(|color| try_parse_color(&color))?,
background: vscode_editor_background,
title_bar_background: vscode_colors
.title_bar_active_background
.as_ref()
@ -214,17 +216,12 @@ impl VsCodeThemeConverter {
.as_ref()
.traverse(|color| try_parse_color(&color))?,
toolbar_background: vscode_colors
.panel_background
.breadcrumb_background
.as_ref()
.traverse(|color| try_parse_color(&color))?,
editor_background: vscode_colors
.editor_background
.as_ref()
.traverse(|color| try_parse_color(&color))?,
editor_gutter_background: vscode_colors
.editor_background
.as_ref()
.traverse(|color| try_parse_color(&color))?,
.traverse(|color| try_parse_color(&color))?
.or(vscode_editor_background),
editor_background: vscode_editor_background,
editor_gutter_background: vscode_editor_background,
editor_line_number: vscode_colors
.editor_line_number_foreground
.as_ref()