From bb3f59252e4bbee5a0ace68476d8ebb69200e363 Mon Sep 17 00:00:00 2001 From: Marshall Bowers Date: Wed, 25 Oct 2023 16:04:49 +0200 Subject: [PATCH] Rename `theme2` getter to `theme` --- crates/ui2/src/color.rs | 5 ++--- crates/ui2/src/theme.rs | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/crates/ui2/src/color.rs b/crates/ui2/src/color.rs index dcca95ae961aa91060348633d68eacdc8037f316..dfc734a75e743183c86f1af771a51156888b557e 100644 --- a/crates/ui2/src/color.rs +++ b/crates/ui2/src/color.rs @@ -1,4 +1,4 @@ -use crate::theme2; +use crate::theme; pub use crate::{old_theme, ButtonVariant, ElementExt, Theme}; use gpui2::{hsla, rgb, Hsla, WindowContext}; use strum::EnumIter; @@ -253,8 +253,7 @@ impl std::fmt::Debug for ThemeColor { impl ThemeColor { pub fn new(cx: &WindowContext) -> Self { - let theme = old_theme(cx); - let theme2 = theme2(cx); + let theme2 = theme(cx); let transparent = hsla(0.0, 0.0, 0.0, 0.0); let players = [ diff --git a/crates/ui2/src/theme.rs b/crates/ui2/src/theme.rs index e921019e7032503e44068d2459162e808f051531..e772fb206137d8bced626f7339adc810ea974b20 100644 --- a/crates/ui2/src/theme.rs +++ b/crates/ui2/src/theme.rs @@ -218,6 +218,6 @@ pub fn old_theme(cx: &WindowContext) -> Arc { Arc::new(cx.global::().clone()) } -pub fn theme2(cx: &WindowContext) -> Arc { +pub fn theme(cx: &WindowContext) -> Arc { cx.global::>().clone() }