Rename ThemeVariant to Theme (#3252)

This PR renames the `ThemeVariant` type to `Theme`.

This better reflects its purpose, as well as matches the same name as we
had before, which should make porting crates slightly easier.

Release Notes:

- N/A
This commit is contained in:
Marshall Bowers 2023-11-07 16:41:36 +01:00 committed by GitHub
parent 9cb8512603
commit 74853ea55f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
22 changed files with 82 additions and 82 deletions

View file

@ -3,7 +3,7 @@ use std::fmt::{self, Debug};
use gpui::{Hsla, Rgba};
use theme::{
Appearance, GitStatusColors, PlayerColor, PlayerColors, StatusColors, SyntaxTheme,
SystemColors, ThemeColors, ThemeFamily, ThemeStyles, ThemeVariant,
SystemColors, Theme, ThemeColors, ThemeFamily, ThemeStyles,
};
struct RawSyntaxPrinter<'a>(&'a str);
@ -68,7 +68,7 @@ impl Debug for ThemeFamilyPrinter {
}
}
pub struct ThemeVariantPrinter<'a>(&'a ThemeVariant);
pub struct ThemeVariantPrinter<'a>(&'a Theme);
impl<'a> Debug for ThemeVariantPrinter<'a> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {

View file

@ -2,8 +2,8 @@ use anyhow::Result;
use gpui::{Hsla, Refineable, Rgba};
use serde::Deserialize;
use theme::{
Appearance, GitStatusColors, PlayerColors, StatusColors, SyntaxTheme, SystemColors,
ThemeColors, ThemeColorsRefinement, ThemeStyles, ThemeVariant,
Appearance, GitStatusColors, PlayerColors, StatusColors, SyntaxTheme, SystemColors, Theme,
ThemeColors, ThemeColorsRefinement, ThemeStyles,
};
use crate::util::Traverse;
@ -433,7 +433,7 @@ impl VsCodeThemeConverter {
}
}
pub fn convert(self) -> Result<ThemeVariant> {
pub fn convert(self) -> Result<Theme> {
let appearance = self.theme_metadata.appearance.into();
let mut theme_colors = match appearance {
@ -569,7 +569,7 @@ impl VsCodeThemeConverter {
theme_colors.refine(&theme_colors_refinements);
Ok(ThemeVariant {
Ok(Theme {
id: uuid::Uuid::new_v4().to_string(),
name: self.theme_metadata.name.into(),
appearance,