From 698460ea897723bf23253e6e6411f70168844258 Mon Sep 17 00:00:00 2001 From: Marshall Bowers Date: Fri, 22 Dec 2023 23:06:30 -0500 Subject: [PATCH] Style inlay hints (#3806) This PR styles the inlay hints after the changes to the themes. Release Notes: - N/A --- crates/editor2/src/editor.rs | 4 ---- crates/theme2/src/themes/andromeda.rs | 1 + crates/theme2/src/themes/atelier.rs | 20 ++++++++++++++++++++ crates/theme2/src/themes/ayu.rs | 3 +++ crates/theme2/src/themes/gruvbox.rs | 6 ++++++ crates/theme2/src/themes/one.rs | 2 ++ crates/theme2/src/themes/rose_pine.rs | 3 +++ crates/theme2/src/themes/sandcastle.rs | 1 + crates/theme2/src/themes/solarized.rs | 2 ++ crates/theme2/src/themes/summercamp.rs | 1 + crates/theme_importer/src/zed1/converter.rs | 2 ++ 11 files changed, 41 insertions(+), 4 deletions(-) diff --git a/crates/editor2/src/editor.rs b/crates/editor2/src/editor.rs index 943ddf47bdad7dedc6b5d1f55a1828d80b99097b..d3ee41b11f92512a88c6b6dc334256aacc8625aa 100644 --- a/crates/editor2/src/editor.rs +++ b/crates/editor2/src/editor.rs @@ -7676,12 +7676,10 @@ impl Editor { inlays_style: HighlightStyle { color: Some(cx.theme().status().hint), font_weight: Some(FontWeight::BOLD), - fade_out: Some(0.6), ..HighlightStyle::default() }, suggestions_style: HighlightStyle { color: Some(cx.theme().status().predictive), - fade_out: Some(0.6), ..HighlightStyle::default() }, }, @@ -9348,12 +9346,10 @@ impl Render for Editor { inlays_style: HighlightStyle { color: Some(cx.theme().status().hint), font_weight: Some(FontWeight::BOLD), - fade_out: Some(0.6), ..HighlightStyle::default() }, suggestions_style: HighlightStyle { color: Some(cx.theme().status().predictive), - fade_out: Some(0.6), ..HighlightStyle::default() }, }, diff --git a/crates/theme2/src/themes/andromeda.rs b/crates/theme2/src/themes/andromeda.rs index 67c18f88adf2d6150065c3108bc1b6f6df058bdf..0a9b977d21eacd782f7461b11c5bca654d775093 100644 --- a/crates/theme2/src/themes/andromeda.rs +++ b/crates/theme2/src/themes/andromeda.rs @@ -71,6 +71,7 @@ pub fn andromeda() -> UserThemeFamily { created: Some(rgba(0x96df72ff).into()), deleted: Some(rgba(0xcd1d5aff).into()), error: Some(rgba(0xf82872ff).into()), + hint: Some(rgba(0x618399ff).into()), modified: Some(rgba(0xfee56dff).into()), success: Some(rgba(0xf7f7f8ff).into()), warning: Some(rgba(0xfee56dff).into()), diff --git a/crates/theme2/src/themes/atelier.rs b/crates/theme2/src/themes/atelier.rs index d6681aa6b194fa2bb0227ea59f460e57155fdfde..e5c2e49d5bda7e7781eb0abc9901e6e40a968a2f 100644 --- a/crates/theme2/src/themes/atelier.rs +++ b/crates/theme2/src/themes/atelier.rs @@ -72,6 +72,7 @@ pub fn atelier() -> UserThemeFamily { created: Some(rgba(0x98ab54ff).into()), deleted: Some(rgba(0xba6337ff).into()), error: Some(rgba(0xba6337ff).into()), + hint: Some(rgba(0x768962ff).into()), modified: Some(rgba(0xa59810ff).into()), success: Some(rgba(0x22221bff).into()), warning: Some(rgba(0xa59810ff).into()), @@ -474,6 +475,7 @@ pub fn atelier() -> UserThemeFamily { created: Some(rgba(0x7b9727ff).into()), deleted: Some(rgba(0xc82234ff).into()), error: Some(rgba(0xf22d40ff).into()), + hint: Some(rgba(0xa87187ff).into()), modified: Some(rgba(0xc38419ff).into()), success: Some(rgba(0xf1efeeff).into()), warning: Some(rgba(0xc38419ff).into()), @@ -876,6 +878,7 @@ pub fn atelier() -> UserThemeFamily { created: Some(rgba(0x6fae80ff).into()), deleted: Some(rgba(0xb1623aff).into()), error: Some(rgba(0xb1623aff).into()), + hint: Some(rgba(0x66847cff).into()), modified: Some(rgba(0xa07e3cff).into()), success: Some(rgba(0x171c19ff).into()), warning: Some(rgba(0xa07e3cff).into()), @@ -1278,6 +1281,7 @@ pub fn atelier() -> UserThemeFamily { created: Some(rgba(0x2c9292ff).into()), deleted: Some(rgba(0x953a5fff).into()), error: Some(rgba(0xbe4678ff).into()), + hint: Some(rgba(0x716998ff).into()), modified: Some(rgba(0xa06e3bff).into()), success: Some(rgba(0xefecf4ff).into()), warning: Some(rgba(0xa06e3bff).into()), @@ -1680,6 +1684,7 @@ pub fn atelier() -> UserThemeFamily { created: Some(rgba(0x7d9727ff).into()), deleted: Some(rgba(0x934e2dff).into()), error: Some(rgba(0xba6237ff).into()), + hint: Some(rgba(0x70825bff).into()), modified: Some(rgba(0xa59810ff).into()), success: Some(rgba(0xf4f3ecff).into()), warning: Some(rgba(0xa59810ff).into()), @@ -2082,6 +2087,7 @@ pub fn atelier() -> UserThemeFamily { created: Some(rgba(0xac973aff).into()), deleted: Some(rgba(0xa33a1eff).into()), error: Some(rgba(0xc94923ff).into()), + hint: Some(rgba(0x6d82a6ff).into()), modified: Some(rgba(0xc08b31ff).into()), success: Some(rgba(0xf5f7ffff).into()), warning: Some(rgba(0xc08b31ff).into()), @@ -2484,6 +2490,7 @@ pub fn atelier() -> UserThemeFamily { created: Some(rgba(0xbfab61ff).into()), deleted: Some(rgba(0xc94a23ff).into()), error: Some(rgba(0xc94a23ff).into()), + hint: Some(rgba(0x7087b2ff).into()), modified: Some(rgba(0xc08b31ff).into()), success: Some(rgba(0x202746ff).into()), warning: Some(rgba(0xc08b31ff).into()), @@ -2886,6 +2893,7 @@ pub fn atelier() -> UserThemeFamily { created: Some(rgba(0x60ac3aff).into()), deleted: Some(rgba(0xaf2c2eff).into()), error: Some(rgba(0xd73837ff).into()), + hint: Some(rgba(0xb17272ff).into()), modified: Some(rgba(0xae9515ff).into()), success: Some(rgba(0xfefbecff).into()), warning: Some(rgba(0xae9515ff).into()), @@ -3288,6 +3296,7 @@ pub fn atelier() -> UserThemeFamily { created: Some(rgba(0x2ba32aff).into()), deleted: Some(rgba(0xbd1331ff).into()), error: Some(rgba(0xe61c3cff).into()), + hint: Some(rgba(0x008b9fff).into()), modified: Some(rgba(0x98981cff).into()), success: Some(rgba(0xf4fbf4ff).into()), warning: Some(rgba(0x98981cff).into()), @@ -3690,6 +3699,7 @@ pub fn atelier() -> UserThemeFamily { created: Some(rgba(0x5fa8a7ff).into()), deleted: Some(rgba(0xbe4778ff).into()), error: Some(rgba(0xbe4778ff).into()), + hint: Some(rgba(0x786e9dff).into()), modified: Some(rgba(0xa06e3cff).into()), success: Some(rgba(0x19171cff).into()), warning: Some(rgba(0xa06e3cff).into()), @@ -4092,6 +4102,7 @@ pub fn atelier() -> UserThemeFamily { created: Some(rgba(0x4b8b8bff).into()), deleted: Some(rgba(0xa23b3bff).into()), error: Some(rgba(0xca4949ff).into()), + hint: Some(rgba(0x8a647aff).into()), modified: Some(rgba(0xa06e3bff).into()), success: Some(rgba(0xf4ececff).into()), warning: Some(rgba(0xa06e3bff).into()), @@ -4494,6 +4505,7 @@ pub fn atelier() -> UserThemeFamily { created: Some(rgba(0x918b3bff).into()), deleted: Some(rgba(0xa43424ff).into()), error: Some(rgba(0xca402cff).into()), + hint: Some(rgba(0x8d70a8ff).into()), modified: Some(rgba(0xbb8a36ff).into()), success: Some(rgba(0xf7f3f7ff).into()), warning: Some(rgba(0xbb8a36ff).into()), @@ -4896,6 +4908,7 @@ pub fn atelier() -> UserThemeFamily { created: Some(rgba(0x568c3bff).into()), deleted: Some(rgba(0xa9275aff).into()), error: Some(rgba(0xd22e72ff).into()), + hint: Some(rgba(0x52809aff).into()), modified: Some(rgba(0x8a8a11ff).into()), success: Some(rgba(0xebf8ffff).into()), warning: Some(rgba(0x8a8a11ff).into()), @@ -5298,6 +5311,7 @@ pub fn atelier() -> UserThemeFamily { created: Some(rgba(0x97ab54ff).into()), deleted: Some(rgba(0xf22e41ff).into()), error: Some(rgba(0xf22e41ff).into()), + hint: Some(rgba(0xa67287ff).into()), modified: Some(rgba(0xc3841aff).into()), success: Some(rgba(0x1b1918ff).into()), warning: Some(rgba(0xc3841aff).into()), @@ -5700,6 +5714,7 @@ pub fn atelier() -> UserThemeFamily { created: Some(rgba(0x83bd62ff).into()), deleted: Some(rgba(0xd73838ff).into()), error: Some(rgba(0xd73838ff).into()), + hint: Some(rgba(0xb37979ff).into()), modified: Some(rgba(0xae9515ff).into()), success: Some(rgba(0x20201dff).into()), warning: Some(rgba(0xae9515ff).into()), @@ -6102,6 +6117,7 @@ pub fn atelier() -> UserThemeFamily { created: Some(rgba(0x70a2a1ff).into()), deleted: Some(rgba(0xca4a4aff).into()), error: Some(rgba(0xca4a4aff).into()), + hint: Some(rgba(0x916a80ff).into()), modified: Some(rgba(0xa06e3cff).into()), success: Some(rgba(0x1b1818ff).into()), warning: Some(rgba(0xa06e3cff).into()), @@ -6504,6 +6520,7 @@ pub fn atelier() -> UserThemeFamily { created: Some(rgba(0x61b656ff).into()), deleted: Some(rgba(0xe61c3dff).into()), error: Some(rgba(0xe61c3dff).into()), + hint: Some(rgba(0x008fa1ff).into()), modified: Some(rgba(0x98981dff).into()), success: Some(rgba(0x131513ff).into()), warning: Some(rgba(0x98981dff).into()), @@ -6906,6 +6923,7 @@ pub fn atelier() -> UserThemeFamily { created: Some(rgba(0x489963ff).into()), deleted: Some(rgba(0x8b4d2fff).into()), error: Some(rgba(0xb16139ff).into()), + hint: Some(rgba(0x607e76ff).into()), modified: Some(rgba(0xa07e3bff).into()), success: Some(rgba(0xecf4eeff).into()), warning: Some(rgba(0xa07e3bff).into()), @@ -7308,6 +7326,7 @@ pub fn atelier() -> UserThemeFamily { created: Some(rgba(0xa8a161ff).into()), deleted: Some(rgba(0xca412cff).into()), error: Some(rgba(0xca412cff).into()), + hint: Some(rgba(0x8c70a6ff).into()), modified: Some(rgba(0xbb8a36ff).into()), success: Some(rgba(0x1b181bff).into()), warning: Some(rgba(0xbb8a36ff).into()), @@ -7710,6 +7729,7 @@ pub fn atelier() -> UserThemeFamily { created: Some(rgba(0x78a361ff).into()), deleted: Some(rgba(0xd22f72ff).into()), error: Some(rgba(0xd22f72ff).into()), + hint: Some(rgba(0x5a87a0ff).into()), modified: Some(rgba(0x8a8a11ff).into()), success: Some(rgba(0x161b1dff).into()), warning: Some(rgba(0x8a8a11ff).into()), diff --git a/crates/theme2/src/themes/ayu.rs b/crates/theme2/src/themes/ayu.rs index 4ea839eaa955ed558437cc8909c10f534df84289..7c0eb701081f002ec5c1bd54ed11fc45e08bee2a 100644 --- a/crates/theme2/src/themes/ayu.rs +++ b/crates/theme2/src/themes/ayu.rs @@ -72,6 +72,7 @@ pub fn ayu() -> UserThemeFamily { created: Some(rgba(0xaad84cff).into()), deleted: Some(rgba(0xc3595fff).into()), error: Some(rgba(0xef7178ff).into()), + hint: Some(rgba(0x638c81ff).into()), modified: Some(rgba(0xfeb454ff).into()), success: Some(rgba(0xbfbdb6ff).into()), warning: Some(rgba(0xfeb454ff).into()), @@ -453,6 +454,7 @@ pub fn ayu() -> UserThemeFamily { created: Some(rgba(0xa1c24bff).into()), deleted: Some(rgba(0xef7271ff).into()), error: Some(rgba(0xef7271ff).into()), + hint: Some(rgba(0x8ca7c2ff).into()), modified: Some(rgba(0xf1ae4aff).into()), success: Some(rgba(0x5c6166ff).into()), warning: Some(rgba(0xf1ae4aff).into()), @@ -834,6 +836,7 @@ pub fn ayu() -> UserThemeFamily { created: Some(rgba(0xd5fe80ff).into()), deleted: Some(rgba(0xc46a60ff).into()), error: Some(rgba(0xf18779ff).into()), + hint: Some(rgba(0x7399a3ff).into()), modified: Some(rgba(0xfed073ff).into()), success: Some(rgba(0xcccac2ff).into()), warning: Some(rgba(0xfed073ff).into()), diff --git a/crates/theme2/src/themes/gruvbox.rs b/crates/theme2/src/themes/gruvbox.rs index 096afc7ee3487a9e88140bfeff7595e3124a7266..8cc13fb1771a080a8addcf67ef0cbf0b74530948 100644 --- a/crates/theme2/src/themes/gruvbox.rs +++ b/crates/theme2/src/themes/gruvbox.rs @@ -72,6 +72,7 @@ pub fn gruvbox() -> UserThemeFamily { created: Some(rgba(0x958e43ff).into()), deleted: Some(rgba(0x9d0408ff).into()), error: Some(rgba(0x9d0408ff).into()), + hint: Some(rgba(0x677562ff).into()), modified: Some(rgba(0xb57616ff).into()), success: Some(rgba(0x282828ff).into()), warning: Some(rgba(0xb57616ff).into()), @@ -460,6 +461,7 @@ pub fn gruvbox() -> UserThemeFamily { created: Some(rgba(0xb8bb27ff).into()), deleted: Some(rgba(0xd0382bff).into()), error: Some(rgba(0xfb4a35ff).into()), + hint: Some(rgba(0x8d957eff).into()), modified: Some(rgba(0xf9bd30ff).into()), success: Some(rgba(0xfbf1c7ff).into()), warning: Some(rgba(0xf9bd30ff).into()), @@ -848,6 +850,7 @@ pub fn gruvbox() -> UserThemeFamily { created: Some(rgba(0x958e43ff).into()), deleted: Some(rgba(0x9d0408ff).into()), error: Some(rgba(0x9d0408ff).into()), + hint: Some(rgba(0x677562ff).into()), modified: Some(rgba(0xb57616ff).into()), success: Some(rgba(0x282828ff).into()), warning: Some(rgba(0xb57616ff).into()), @@ -1236,6 +1239,7 @@ pub fn gruvbox() -> UserThemeFamily { created: Some(rgba(0xb8bb27ff).into()), deleted: Some(rgba(0xd0382bff).into()), error: Some(rgba(0xfb4a35ff).into()), + hint: Some(rgba(0x8d957eff).into()), modified: Some(rgba(0xf9bd30ff).into()), success: Some(rgba(0xfbf1c7ff).into()), warning: Some(rgba(0xf9bd30ff).into()), @@ -1624,6 +1628,7 @@ pub fn gruvbox() -> UserThemeFamily { created: Some(rgba(0x958e43ff).into()), deleted: Some(rgba(0x9d0408ff).into()), error: Some(rgba(0x9d0408ff).into()), + hint: Some(rgba(0x677562ff).into()), modified: Some(rgba(0xb57616ff).into()), success: Some(rgba(0x282828ff).into()), warning: Some(rgba(0xb57616ff).into()), @@ -2012,6 +2017,7 @@ pub fn gruvbox() -> UserThemeFamily { created: Some(rgba(0xb8bb27ff).into()), deleted: Some(rgba(0xd0382bff).into()), error: Some(rgba(0xfb4a35ff).into()), + hint: Some(rgba(0x8d957eff).into()), modified: Some(rgba(0xf9bd30ff).into()), success: Some(rgba(0xfbf1c7ff).into()), warning: Some(rgba(0xf9bd30ff).into()), diff --git a/crates/theme2/src/themes/one.rs b/crates/theme2/src/themes/one.rs index f4d53404fb05e1d7f3bf3b0db8c08a7807a00177..e62ccbefdd61e212984bdea40a166967cae026e6 100644 --- a/crates/theme2/src/themes/one.rs +++ b/crates/theme2/src/themes/one.rs @@ -72,6 +72,7 @@ pub fn one() -> UserThemeFamily { created: Some(rgba(0x84b278ff).into()), deleted: Some(rgba(0xd36151ff).into()), error: Some(rgba(0xd36151ff).into()), + hint: Some(rgba(0x9295beff).into()), modified: Some(rgba(0xdec184ff).into()), success: Some(rgba(0x383a41ff).into()), warning: Some(rgba(0xdec184ff).into()), @@ -460,6 +461,7 @@ pub fn one() -> UserThemeFamily { created: Some(rgba(0xa1c181ff).into()), deleted: Some(rgba(0xa45a5eff).into()), error: Some(rgba(0xd07277ff).into()), + hint: Some(rgba(0x5b708aff).into()), modified: Some(rgba(0xdec184ff).into()), success: Some(rgba(0xc8ccd4ff).into()), warning: Some(rgba(0xdec184ff).into()), diff --git a/crates/theme2/src/themes/rose_pine.rs b/crates/theme2/src/themes/rose_pine.rs index cc14268a0fe05540dab0d8cc88326dc2e4a3b508..318767cb2bc943f5db0524254e98d48402675576 100644 --- a/crates/theme2/src/themes/rose_pine.rs +++ b/crates/theme2/src/themes/rose_pine.rs @@ -72,6 +72,7 @@ pub fn rose_pine() -> UserThemeFamily { created: Some(rgba(0x6bbca3ff).into()), deleted: Some(rgba(0xb4647aff).into()), error: Some(rgba(0xb4647aff).into()), + hint: Some(rgba(0x7a92aaff).into()), modified: Some(rgba(0xe99d35ff).into()), success: Some(rgba(0x575279ff).into()), warning: Some(rgba(0xe99d35ff).into()), @@ -467,6 +468,7 @@ pub fn rose_pine() -> UserThemeFamily { created: Some(rgba(0x5dc2a3ff).into()), deleted: Some(rgba(0xbe5773ff).into()), error: Some(rgba(0xea6f92ff).into()), + hint: Some(rgba(0x728aa2ff).into()), modified: Some(rgba(0xf5c177ff).into()), success: Some(rgba(0xe0def4ff).into()), warning: Some(rgba(0xf5c177ff).into()), @@ -862,6 +864,7 @@ pub fn rose_pine() -> UserThemeFamily { created: Some(rgba(0x5dc2a3ff).into()), deleted: Some(rgba(0xbe5773ff).into()), error: Some(rgba(0xea6f92ff).into()), + hint: Some(rgba(0x5e768cff).into()), modified: Some(rgba(0xf5c177ff).into()), success: Some(rgba(0xe0def4ff).into()), warning: Some(rgba(0xf5c177ff).into()), diff --git a/crates/theme2/src/themes/sandcastle.rs b/crates/theme2/src/themes/sandcastle.rs index ddcd06bec5e2a14568d654d2bfb75a15cb0e0ad3..5aa03988746c8e710657ea89352168ea49f9428b 100644 --- a/crates/theme2/src/themes/sandcastle.rs +++ b/crates/theme2/src/themes/sandcastle.rs @@ -71,6 +71,7 @@ pub fn sandcastle() -> UserThemeFamily { created: Some(rgba(0x83a598ff).into()), deleted: Some(rgba(0x8d4f61ff).into()), error: Some(rgba(0xb4637aff).into()), + hint: Some(rgba(0x727d68ff).into()), modified: Some(rgba(0xa07e3bff).into()), success: Some(rgba(0xfdf4c1ff).into()), warning: Some(rgba(0xa07e3bff).into()), diff --git a/crates/theme2/src/themes/solarized.rs b/crates/theme2/src/themes/solarized.rs index 7bf383e854ded6de475e4e2432002793b83bd620..c71ce54a2f027a32e1bf2424ea4422e893c4265d 100644 --- a/crates/theme2/src/themes/solarized.rs +++ b/crates/theme2/src/themes/solarized.rs @@ -72,6 +72,7 @@ pub fn solarized() -> UserThemeFamily { created: Some(rgba(0xa0ad46ff).into()), deleted: Some(rgba(0xdc3330ff).into()), error: Some(rgba(0xdc3330ff).into()), + hint: Some(rgba(0x5889a3ff).into()), modified: Some(rgba(0xb58904ff).into()), success: Some(rgba(0x002b36ff).into()), warning: Some(rgba(0xb58904ff).into()), @@ -453,6 +454,7 @@ pub fn solarized() -> UserThemeFamily { created: Some(rgba(0x859904ff).into()), deleted: Some(rgba(0xb52727ff).into()), error: Some(rgba(0xdc3330ff).into()), + hint: Some(rgba(0x4f8297ff).into()), modified: Some(rgba(0xb58903ff).into()), success: Some(rgba(0xfdf6e3ff).into()), warning: Some(rgba(0xb58903ff).into()), diff --git a/crates/theme2/src/themes/summercamp.rs b/crates/theme2/src/themes/summercamp.rs index 64f51231ae35b69028170d855be10bec43388708..a849988f7b2ca4855c0b0e5b38fc91707f7763b2 100644 --- a/crates/theme2/src/themes/summercamp.rs +++ b/crates/theme2/src/themes/summercamp.rs @@ -71,6 +71,7 @@ pub fn summercamp() -> UserThemeFamily { created: Some(rgba(0x5dea5aff).into()), deleted: Some(rgba(0xb93f36ff).into()), error: Some(rgba(0xe35142ff).into()), + hint: Some(rgba(0x246e61ff).into()), modified: Some(rgba(0xf1fe29ff).into()), success: Some(rgba(0xf8f5deff).into()), warning: Some(rgba(0xf1fe29ff).into()), diff --git a/crates/theme_importer/src/zed1/converter.rs b/crates/theme_importer/src/zed1/converter.rs index 385ad43350dee1200e790abf9fe64bd2288d266d..a12d96054ca83738069540c5883d8bea069ad667 100644 --- a/crates/theme_importer/src/zed1/converter.rs +++ b/crates/theme_importer/src/zed1/converter.rs @@ -71,6 +71,7 @@ impl Zed1ThemeConverter { Some(zed1_color_to_hsla(color)) } + let editor = &self.theme.editor; let diff_style = &self.theme.editor.diff; let diagnostic_summary = &self.theme.workspace.status_bar.diagnostic_summary; @@ -81,6 +82,7 @@ impl Zed1ThemeConverter { success: convert(diagnostic_summary.icon_color_ok), warning: convert(diagnostic_summary.icon_color_warning), error: convert(diagnostic_summary.icon_color_error), + hint: editor.hint.color.map(zed1_color_to_hsla), ..Default::default() }) }