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:
@@ -21,7 +21,7 @@ use lsp::DiagnosticSeverity;
|
||||
use std::{any::TypeId, borrow::Cow, fmt::Debug, num::NonZeroU32, ops::Range, sync::Arc};
|
||||
use sum_tree::{Bias, TreeMap};
|
||||
use tab_map::TabMap;
|
||||
use theme::ThemeVariant;
|
||||
use theme::Theme;
|
||||
use wrap_map::WrapMap;
|
||||
|
||||
pub use block_map::{
|
||||
@@ -505,7 +505,7 @@ impl DisplaySnapshot {
|
||||
&'a self,
|
||||
display_rows: Range<u32>,
|
||||
language_aware: bool,
|
||||
theme: &'a ThemeVariant,
|
||||
theme: &'a Theme,
|
||||
) -> impl Iterator<Item = HighlightedChunk<'a>> {
|
||||
self.chunks(
|
||||
display_rows,
|
||||
|
||||
@@ -81,7 +81,7 @@ use std::{
|
||||
pub use sum_tree::Bias;
|
||||
use sum_tree::TreeMap;
|
||||
use text::Rope;
|
||||
use theme::{ActiveTheme, PlayerColor, ThemeColors, ThemeSettings, ThemeVariant};
|
||||
use theme::{ActiveTheme, PlayerColor, Theme, ThemeColors, ThemeSettings};
|
||||
use util::{post_inc, RangeExt, ResultExt, TryFutureExt};
|
||||
use workspace::{ItemNavHistory, SplitDirection, ViewId, Workspace};
|
||||
|
||||
@@ -9962,7 +9962,7 @@ pub fn highlight_diagnostic_message(
|
||||
(message_without_backticks, highlights)
|
||||
}
|
||||
|
||||
pub fn diagnostic_style(severity: DiagnosticSeverity, valid: bool, theme: &ThemeVariant) -> Hsla {
|
||||
pub fn diagnostic_style(severity: DiagnosticSeverity, valid: bool, theme: &Theme) -> Hsla {
|
||||
match (severity, valid) {
|
||||
(DiagnosticSeverity::ERROR, true) => theme.status().error,
|
||||
(DiagnosticSeverity::ERROR, false) => theme.status().error,
|
||||
|
||||
@@ -27,7 +27,7 @@ use std::{
|
||||
sync::Arc,
|
||||
};
|
||||
use text::Selection;
|
||||
use theme::{ActiveTheme, ThemeVariant};
|
||||
use theme::{ActiveTheme, Theme};
|
||||
use util::{paths::PathExt, ResultExt, TryFutureExt};
|
||||
use workspace::item::{BreadcrumbText, FollowableItemHandle};
|
||||
use workspace::{
|
||||
@@ -777,7 +777,7 @@ impl Item for Editor {
|
||||
ToolbarItemLocation::PrimaryLeft { flex: None }
|
||||
}
|
||||
|
||||
fn breadcrumbs(&self, variant: &ThemeVariant, cx: &AppContext) -> Option<Vec<BreadcrumbText>> {
|
||||
fn breadcrumbs(&self, variant: &Theme, cx: &AppContext) -> Option<Vec<BreadcrumbText>> {
|
||||
todo!();
|
||||
// let cursor = self.selections.newest_anchor().head();
|
||||
// let multibuffer = &self.buffer().read(cx);
|
||||
|
||||
Reference in New Issue
Block a user