Motivation for this change is #23113, but this will also be the state of it after the gpui refactor. Release Notes: - N/A
Unified · Split
| @@ -1,5 +1,6 @@ | |||
| 1 | use gpui::{ | 1 | use gpui::{ |
| 2 | div, rems, IntoElement, ParentElement, Rems, RenderOnce, SharedString, Styled, WindowContext, | 2 | div, rems, AppContext, IntoElement, ParentElement, Rems, RenderOnce, SharedString, Styled, |
| 3 | WindowContext, | ||
| 3 | }; | 4 | }; |
| 4 | use settings::Settings; | 5 | use settings::Settings; |
| 5 | use theme::{ActiveTheme, ThemeSettings}; | 6 | use theme::{ActiveTheme, ThemeSettings}; |
| @@ -130,7 +131,7 @@ pub enum TextSize { · 124 unmodified lines | |||
| 130 | 131 | ||
| 131 | impl TextSize { | 132 | impl TextSize { |
| 132 | /// Returns the text size in rems. | 133 | /// Returns the text size in rems. |
| 133 | pub fn rems(self, cx: &WindowContext) -> Rems { | 134 | pub fn rems(self, cx: &AppContext) -> Rems { |
| 134 | let theme_settings = ThemeSettings::get_global(cx); | 135 | let theme_settings = ThemeSettings::get_global(cx); |
| 135 | 136 | ||
| 136 | match self { | 137 | match self { |