mirror of
https://github.com/zed-industries/zed.git
synced 2024-11-09 21:26:14 +03:00
Rename theme
getter to old_theme
This commit is contained in:
parent
8043d0d8a9
commit
258496700f
@ -1,5 +1,5 @@
|
||||
use crate::theme2;
|
||||
pub use crate::{theme, ButtonVariant, ElementExt, Theme};
|
||||
pub use crate::{old_theme, ButtonVariant, ElementExt, Theme};
|
||||
use gpui2::{hsla, rgb, Hsla, WindowContext};
|
||||
use strum::EnumIter;
|
||||
|
||||
@ -20,7 +20,7 @@ impl std::fmt::Debug for PlayerThemeColors {
|
||||
|
||||
impl PlayerThemeColors {
|
||||
pub fn new(cx: &WindowContext, ix: usize) -> Self {
|
||||
let theme = theme(cx);
|
||||
let theme = old_theme(cx);
|
||||
|
||||
if ix < theme.players.len() {
|
||||
Self {
|
||||
@ -57,7 +57,7 @@ impl std::fmt::Debug for SyntaxColor {
|
||||
|
||||
impl SyntaxColor {
|
||||
pub fn new(cx: &WindowContext) -> Self {
|
||||
let theme = theme(cx);
|
||||
let theme = old_theme(cx);
|
||||
|
||||
Self {
|
||||
comment: theme
|
||||
@ -253,7 +253,7 @@ impl std::fmt::Debug for ThemeColor {
|
||||
|
||||
impl ThemeColor {
|
||||
pub fn new(cx: &WindowContext) -> Self {
|
||||
let theme = theme(cx);
|
||||
let theme = old_theme(cx);
|
||||
let theme2 = theme2(cx);
|
||||
let transparent = hsla(0.0, 0.0, 0.0, 0.0);
|
||||
|
||||
|
@ -5,7 +5,7 @@ use gpui2::{px, relative, rems, view, Context, Size, View};
|
||||
|
||||
use crate::{prelude::*, NotificationsPanel};
|
||||
use crate::{
|
||||
static_livestream, theme, user_settings_mut, v_stack, AssistantPanel, Button, ChatMessage,
|
||||
static_livestream, old_theme, user_settings_mut, v_stack, AssistantPanel, Button, ChatMessage,
|
||||
ChatPanel, CollabPanel, EditorPane, FakeSettings, Label, LanguageSelector, Pane, PaneGroup,
|
||||
Panel, PanelAllowedSides, PanelSide, ProjectPanel, SettingValue, SplitDirection, StatusBar,
|
||||
Terminal, TitleBar, Toast, ToastOrigin,
|
||||
@ -175,7 +175,7 @@ impl Workspace {
|
||||
}
|
||||
|
||||
pub fn render(&mut self, cx: &mut ViewContext<Self>) -> impl Element<ViewState = Self> {
|
||||
let theme = theme(cx).clone();
|
||||
let theme = old_theme(cx).clone();
|
||||
|
||||
let color = ThemeColor::new(cx);
|
||||
|
||||
|
@ -4,7 +4,7 @@ use gpui2::{svg, Hsla};
|
||||
use strum::EnumIter;
|
||||
|
||||
use crate::prelude::*;
|
||||
use crate::theme::theme;
|
||||
use crate::theme::old_theme;
|
||||
|
||||
#[derive(Default, PartialEq, Copy, Clone)]
|
||||
pub enum IconSize {
|
||||
@ -29,7 +29,7 @@ pub enum IconColor {
|
||||
|
||||
impl IconColor {
|
||||
pub fn color(self, cx: &WindowContext) -> Hsla {
|
||||
let theme = theme(cx);
|
||||
let theme = old_theme(cx);
|
||||
match self {
|
||||
IconColor::Default => theme.lowest.base.default.foreground,
|
||||
IconColor::Muted => theme.lowest.variant.default.foreground,
|
||||
|
@ -4,7 +4,7 @@ use gpui2::{relative, Hsla, WindowContext};
|
||||
use smallvec::SmallVec;
|
||||
|
||||
use crate::prelude::*;
|
||||
use crate::theme::theme;
|
||||
use crate::theme::old_theme;
|
||||
|
||||
#[derive(Default, PartialEq, Copy, Clone)]
|
||||
pub enum LabelColor {
|
||||
@ -24,7 +24,7 @@ impl LabelColor {
|
||||
pub fn hsla(&self, cx: &WindowContext) -> Hsla {
|
||||
let color = ThemeColor::new(cx);
|
||||
// TODO: Remove
|
||||
let theme = theme(cx);
|
||||
let theme = old_theme(cx);
|
||||
|
||||
match self {
|
||||
Self::Default => color.text,
|
||||
|
@ -6,7 +6,7 @@ pub use gpui2::{
|
||||
pub use crate::color::*;
|
||||
pub use crate::elevation::*;
|
||||
use crate::settings::user_settings;
|
||||
pub use crate::{theme, ButtonVariant, ElementExt, Theme};
|
||||
pub use crate::{old_theme, ButtonVariant, ElementExt, Theme};
|
||||
|
||||
use gpui2::{rems, Hsla, Rems};
|
||||
use strum::EnumIter;
|
||||
|
@ -214,7 +214,7 @@ where
|
||||
}
|
||||
}
|
||||
|
||||
pub fn theme(cx: &WindowContext) -> Arc<Theme> {
|
||||
pub fn old_theme(cx: &WindowContext) -> Arc<Theme> {
|
||||
Arc::new(cx.global::<Theme>().clone())
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user