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:
parent
9cb8512603
commit
74853ea55f
22 changed files with 82 additions and 82 deletions
|
@ -33,11 +33,11 @@ pub fn init(cx: &mut AppContext) {
|
|||
}
|
||||
|
||||
pub trait ActiveTheme {
|
||||
fn theme(&self) -> &Arc<ThemeVariant>;
|
||||
fn theme(&self) -> &Arc<Theme>;
|
||||
}
|
||||
|
||||
impl ActiveTheme for AppContext {
|
||||
fn theme(&self) -> &Arc<ThemeVariant> {
|
||||
fn theme(&self) -> &Arc<Theme> {
|
||||
&ThemeSettings::get_global(self).active_theme
|
||||
}
|
||||
}
|
||||
|
@ -46,20 +46,20 @@ pub struct ThemeFamily {
|
|||
pub id: String,
|
||||
pub name: SharedString,
|
||||
pub author: SharedString,
|
||||
pub themes: Vec<ThemeVariant>,
|
||||
pub themes: Vec<Theme>,
|
||||
pub scales: ColorScales,
|
||||
}
|
||||
|
||||
impl ThemeFamily {}
|
||||
|
||||
pub struct ThemeVariant {
|
||||
pub struct Theme {
|
||||
pub id: String,
|
||||
pub name: SharedString,
|
||||
pub appearance: Appearance,
|
||||
pub styles: ThemeStyles,
|
||||
}
|
||||
|
||||
impl ThemeVariant {
|
||||
impl Theme {
|
||||
/// Returns the [`ThemeColors`] for the theme.
|
||||
#[inline(always)]
|
||||
pub fn players(&self) -> &PlayerColors {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue