Replace GitStatusColors with StatusColors (#3268)

This PR removes `GitStatusColors` in favor of just using `StatusColors`
instead.

Release Notes:

- N/A
This commit is contained in:
Marshall Bowers 2023-11-08 17:32:32 +01:00 committed by GitHub
parent 9e5a4ea6c4
commit b6766ba39a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 30 additions and 75 deletions

View file

@ -65,6 +65,12 @@ pub struct Theme {
}
impl Theme {
/// Returns the [`SystemColors`] for the theme.
#[inline(always)]
pub fn system(&self) -> &SystemColors {
&self.styles.system
}
/// Returns the [`ThemeColors`] for the theme.
#[inline(always)]
pub fn players(&self) -> &PlayerColors {
@ -89,19 +95,13 @@ impl Theme {
&self.styles.status
}
/// Returns the [`GitStatusColors`] for the theme.
#[inline(always)]
pub fn git(&self) -> &GitStatusColors {
&self.styles.git
}
/// Returns the color for the syntax node with the given name.
#[inline(always)]
pub fn syntax_color(&self, name: &str) -> Hsla {
self.syntax().color(name)
}
/// Returns the [`StatusColors`] for the theme.
/// Returns the [`DiagnosticStyle`] for the theme.
#[inline(always)]
pub fn diagnostic_style(&self) -> DiagnosticStyle {
DiagnosticStyle {