Add hover_line_number
color token (#23279)
This enables having a dedicated color for the line number hover state. That's relevant because line numbers can now be clicked to jump to cursor location in multibuffers. Release Notes: - N/A --------- Co-authored-by: João Marcos <marcospb19@hotmail.com>
This commit is contained in:
parent
37dcca62b7
commit
da1c3d8b40
14 changed files with 133 additions and 79 deletions
|
@ -76,6 +76,7 @@ impl ThemeColors {
|
|||
editor_active_line_background: neutral().light_alpha().step_3(),
|
||||
editor_highlighted_line_background: neutral().light_alpha().step_3(),
|
||||
editor_line_number: neutral().light().step_10(),
|
||||
editor_hover_line_number: neutral().light().step_12(),
|
||||
editor_active_line_number: neutral().light().step_11(),
|
||||
editor_invisible: neutral().light().step_10(),
|
||||
editor_wrap_guide: neutral().light_alpha().step_7(),
|
||||
|
@ -182,7 +183,8 @@ impl ThemeColors {
|
|||
editor_active_line_background: neutral().dark_alpha().step_3(),
|
||||
editor_highlighted_line_background: neutral().dark_alpha().step_4(),
|
||||
editor_line_number: neutral().dark_alpha().step_10(),
|
||||
editor_active_line_number: neutral().dark_alpha().step_12(),
|
||||
editor_hover_line_number: neutral().dark_alpha().step_12(),
|
||||
editor_active_line_number: neutral().dark_alpha().step_11(),
|
||||
editor_invisible: neutral().dark_alpha().step_4(),
|
||||
editor_wrap_guide: neutral().dark_alpha().step_4(),
|
||||
editor_active_wrap_guide: neutral().dark_alpha().step_4(),
|
||||
|
|
|
@ -90,6 +90,7 @@ pub(crate) fn zed_default_dark() -> Theme {
|
|||
editor_highlighted_line_background: hsla(207.8 / 360., 81. / 100., 66. / 100., 0.1),
|
||||
editor_line_number: hsla(222.0 / 360., 11.5 / 100., 34.1 / 100., 1.0),
|
||||
editor_active_line_number: hsla(216.0 / 360., 5.9 / 100., 49.6 / 100., 1.0),
|
||||
editor_hover_line_number: hsla(216.0 / 360., 5.9 / 100., 56.7 / 100., 1.0),
|
||||
editor_invisible: hsla(222.0 / 360., 11.5 / 100., 34.1 / 100., 1.0),
|
||||
editor_wrap_guide: hsla(228. / 360., 8. / 100., 25. / 100., 1.),
|
||||
editor_active_wrap_guide: hsla(228. / 360., 8. / 100., 25. / 100., 1.),
|
||||
|
|
|
@ -390,6 +390,10 @@ pub struct ThemeColorsContent {
|
|||
#[serde(rename = "editor.active_line_number")]
|
||||
pub editor_active_line_number: Option<String>,
|
||||
|
||||
/// Text Color. Used for the text of the line number in the editor gutter when the line is hovered over.
|
||||
#[serde(rename = "editor.hover_line_number")]
|
||||
pub editor_hover_line_number: Option<String>,
|
||||
|
||||
/// Text Color. Used to mark invisible characters in the editor.
|
||||
///
|
||||
/// Example: spaces, tabs, carriage returns, etc.
|
||||
|
@ -793,6 +797,10 @@ impl ThemeColorsContent {
|
|||
.editor_line_number
|
||||
.as_ref()
|
||||
.and_then(|color| try_parse_color(color).ok()),
|
||||
editor_hover_line_number: self
|
||||
.editor_hover_line_number
|
||||
.as_ref()
|
||||
.and_then(|color| try_parse_color(color).ok()),
|
||||
editor_active_line_number: self
|
||||
.editor_active_line_number
|
||||
.as_ref()
|
||||
|
|
|
@ -152,6 +152,8 @@ pub struct ThemeColors {
|
|||
pub editor_line_number: Hsla,
|
||||
/// Text Color. Used for the text of the line number in the editor gutter when the line is highlighted.
|
||||
pub editor_active_line_number: Hsla,
|
||||
/// Text Color. Used for the text of the line number in the editor gutter when the line is hovered over.
|
||||
pub editor_hover_line_number: Hsla,
|
||||
/// Text Color. Used to mark invisible characters in the editor.
|
||||
///
|
||||
/// Example: spaces, tabs, carriage returns, etc.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue