(
&self,
base: Theme,
appearance: Appearance,
scheme: EffectiveColorScheme,
id: &str,
)
| 1888 | } |
| 1889 | |
| 1890 | fn resolve_theme_by_id( |
| 1891 | &self, |
| 1892 | base: Theme, |
| 1893 | appearance: Appearance, |
| 1894 | scheme: EffectiveColorScheme, |
| 1895 | id: &str, |
| 1896 | ) -> Theme { |
| 1897 | if scheme == EffectiveColorScheme::Monochrome { |
| 1898 | return Theme::monochrome(); |
| 1899 | } |
| 1900 | |
| 1901 | if id.is_empty() { |
| 1902 | return base; |
| 1903 | } |
| 1904 | |
| 1905 | if let Some(json) = builtin_theme_json(id) { |
| 1906 | return base |
| 1907 | .apply_opencode_theme_json(json, appearance) |
| 1908 | .unwrap_or(base) |
| 1909 | .with_effective_scheme(scheme); |
| 1910 | } |
| 1911 | |
| 1912 | base |
| 1913 | } |
| 1914 | |
| 1915 | fn preview_theme_selection(&mut self, theme: &ThemeItem, chat_view: &mut ChatView) { |
| 1916 | let appearance = resolve_appearance(&self.config.ui.theme); |
no test coverage detected